{- 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.LocationUriOnly 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
import qualified Language.LSP.Protocol.Types.Uri

{-|
Location with only uri and does not include range.

@since 3.18.0
@proposed
-}
data LocationUriOnly = LocationUriOnly 
  { {-|

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

instance Aeson.ToJSON LocationUriOnly where
  toJSON :: LocationUriOnly -> Value
toJSON (LocationUriOnly Uri
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
"uri" Key -> Uri -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= Uri
arg0]]

instance Aeson.FromJSON LocationUriOnly where
  parseJSON :: Value -> Parser LocationUriOnly
parseJSON = String
-> (Object -> Parser LocationUriOnly)
-> Value
-> Parser LocationUriOnly
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"LocationUriOnly" ((Object -> Parser LocationUriOnly)
 -> Value -> Parser LocationUriOnly)
-> (Object -> Parser LocationUriOnly)
-> Value
-> Parser LocationUriOnly
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Uri -> LocationUriOnly
LocationUriOnly (Uri -> LocationUriOnly) -> Parser Uri -> Parser LocationUriOnly
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser Uri
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"uri"