{- 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.DocumentOnTypeFormattingClientCapabilities 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

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

instance Aeson.ToJSON DocumentOnTypeFormattingClientCapabilities where
  toJSON :: DocumentOnTypeFormattingClientCapabilities -> Value
toJSON (DocumentOnTypeFormattingClientCapabilities 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 DocumentOnTypeFormattingClientCapabilities where
  parseJSON :: Value -> Parser DocumentOnTypeFormattingClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DocumentOnTypeFormattingClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> DocumentOnTypeFormattingClientCapabilities
DocumentOnTypeFormattingClientCapabilities 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"