{- 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.DidChangeConfigurationClientCapabilities 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.Types.Common

{-|

-}
data DidChangeConfigurationClientCapabilities = DidChangeConfigurationClientCapabilities 
  { {-|
  Did change configuration notification supports dynamic registration.
  -}
  DidChangeConfigurationClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  }
  deriving stock (Int -> DidChangeConfigurationClientCapabilities -> ShowS
[DidChangeConfigurationClientCapabilities] -> ShowS
DidChangeConfigurationClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DidChangeConfigurationClientCapabilities] -> ShowS
$cshowList :: [DidChangeConfigurationClientCapabilities] -> ShowS
show :: DidChangeConfigurationClientCapabilities -> String
$cshow :: DidChangeConfigurationClientCapabilities -> String
showsPrec :: Int -> DidChangeConfigurationClientCapabilities -> ShowS
$cshowsPrec :: Int -> DidChangeConfigurationClientCapabilities -> ShowS
Show, DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
$c/= :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
== :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
$c== :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
Eq, Eq DidChangeConfigurationClientCapabilities
DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Ordering
DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
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
min :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
$cmin :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
max :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
$cmax :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities
>= :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
$c>= :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
> :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
$c> :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
<= :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
$c<= :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
< :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
$c< :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Bool
compare :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Ordering
$ccompare :: DidChangeConfigurationClientCapabilities
-> DidChangeConfigurationClientCapabilities -> Ordering
Ord, forall x.
Rep DidChangeConfigurationClientCapabilities x
-> DidChangeConfigurationClientCapabilities
forall x.
DidChangeConfigurationClientCapabilities
-> Rep DidChangeConfigurationClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DidChangeConfigurationClientCapabilities x
-> DidChangeConfigurationClientCapabilities
$cfrom :: forall x.
DidChangeConfigurationClientCapabilities
-> Rep DidChangeConfigurationClientCapabilities x
Generic)
  deriving anyclass (DidChangeConfigurationClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: DidChangeConfigurationClientCapabilities -> ()
$crnf :: DidChangeConfigurationClientCapabilities -> ()
NFData, Eq DidChangeConfigurationClientCapabilities
Int -> DidChangeConfigurationClientCapabilities -> Int
DidChangeConfigurationClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DidChangeConfigurationClientCapabilities -> Int
$chash :: DidChangeConfigurationClientCapabilities -> Int
hashWithSalt :: Int -> DidChangeConfigurationClientCapabilities -> Int
$chashWithSalt :: Int -> DidChangeConfigurationClientCapabilities -> Int
Hashable)
  deriving forall ann. [DidChangeConfigurationClientCapabilities] -> Doc ann
forall ann. DidChangeConfigurationClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DidChangeConfigurationClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [DidChangeConfigurationClientCapabilities] -> Doc ann
pretty :: forall ann. DidChangeConfigurationClientCapabilities -> Doc ann
$cpretty :: forall ann. DidChangeConfigurationClientCapabilities -> Doc ann
Pretty via (ViaJSON DidChangeConfigurationClientCapabilities)

instance Aeson.ToJSON DidChangeConfigurationClientCapabilities where
  toJSON :: DidChangeConfigurationClientCapabilities -> Value
toJSON (DidChangeConfigurationClientCapabilities Maybe Bool
arg0) = [Pair] -> Value
Aeson.object forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$  [String
"dynamicRegistration" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0]

instance Aeson.FromJSON DidChangeConfigurationClientCapabilities where
  parseJSON :: Value -> Parser DidChangeConfigurationClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DidChangeConfigurationClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> DidChangeConfigurationClientCapabilities
DidChangeConfigurationClientCapabilities forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"dynamicRegistration"