{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.MessageActionItem 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 Data.Text
import qualified Language.LSP.Protocol.Types.Common
data MessageActionItem = MessageActionItem
{
MessageActionItem -> Text
_title :: Data.Text.Text
}
deriving stock (Int -> MessageActionItem -> ShowS
[MessageActionItem] -> ShowS
MessageActionItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessageActionItem] -> ShowS
$cshowList :: [MessageActionItem] -> ShowS
show :: MessageActionItem -> String
$cshow :: MessageActionItem -> String
showsPrec :: Int -> MessageActionItem -> ShowS
$cshowsPrec :: Int -> MessageActionItem -> ShowS
Show, MessageActionItem -> MessageActionItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MessageActionItem -> MessageActionItem -> Bool
$c/= :: MessageActionItem -> MessageActionItem -> Bool
== :: MessageActionItem -> MessageActionItem -> Bool
$c== :: MessageActionItem -> MessageActionItem -> Bool
Eq, Eq MessageActionItem
MessageActionItem -> MessageActionItem -> Bool
MessageActionItem -> MessageActionItem -> Ordering
MessageActionItem -> MessageActionItem -> MessageActionItem
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 :: MessageActionItem -> MessageActionItem -> MessageActionItem
$cmin :: MessageActionItem -> MessageActionItem -> MessageActionItem
max :: MessageActionItem -> MessageActionItem -> MessageActionItem
$cmax :: MessageActionItem -> MessageActionItem -> MessageActionItem
>= :: MessageActionItem -> MessageActionItem -> Bool
$c>= :: MessageActionItem -> MessageActionItem -> Bool
> :: MessageActionItem -> MessageActionItem -> Bool
$c> :: MessageActionItem -> MessageActionItem -> Bool
<= :: MessageActionItem -> MessageActionItem -> Bool
$c<= :: MessageActionItem -> MessageActionItem -> Bool
< :: MessageActionItem -> MessageActionItem -> Bool
$c< :: MessageActionItem -> MessageActionItem -> Bool
compare :: MessageActionItem -> MessageActionItem -> Ordering
$ccompare :: MessageActionItem -> MessageActionItem -> Ordering
Ord, forall x. Rep MessageActionItem x -> MessageActionItem
forall x. MessageActionItem -> Rep MessageActionItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MessageActionItem x -> MessageActionItem
$cfrom :: forall x. MessageActionItem -> Rep MessageActionItem x
Generic)
deriving anyclass (MessageActionItem -> ()
forall a. (a -> ()) -> NFData a
rnf :: MessageActionItem -> ()
$crnf :: MessageActionItem -> ()
NFData, Eq MessageActionItem
Int -> MessageActionItem -> Int
MessageActionItem -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: MessageActionItem -> Int
$chash :: MessageActionItem -> Int
hashWithSalt :: Int -> MessageActionItem -> Int
$chashWithSalt :: Int -> MessageActionItem -> Int
Hashable)
deriving forall ann. [MessageActionItem] -> Doc ann
forall ann. MessageActionItem -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [MessageActionItem] -> Doc ann
$cprettyList :: forall ann. [MessageActionItem] -> Doc ann
pretty :: forall ann. MessageActionItem -> Doc ann
$cpretty :: forall ann. MessageActionItem -> Doc ann
Pretty via (ViaJSON MessageActionItem)
instance Aeson.ToJSON MessageActionItem where
toJSON :: MessageActionItem -> Value
toJSON (MessageActionItem Text
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
$ [[Key
"title" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= Text
arg0]]
instance Aeson.FromJSON MessageActionItem where
parseJSON :: Value -> Parser MessageActionItem
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"MessageActionItem" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Text -> MessageActionItem
MessageActionItem forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"title"