module TD.Query.GetProxies
  (GetProxies(..)
  ) where

import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I

-- | Returns the list of proxies that are currently set up. Can be called before authorization. Returns 'TD.Data.Proxies.Proxies'
data GetProxies
  = GetProxies
  deriving (GetProxies -> GetProxies -> Bool
(GetProxies -> GetProxies -> Bool)
-> (GetProxies -> GetProxies -> Bool) -> Eq GetProxies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetProxies -> GetProxies -> Bool
== :: GetProxies -> GetProxies -> Bool
$c/= :: GetProxies -> GetProxies -> Bool
/= :: GetProxies -> GetProxies -> Bool
Eq, Int -> GetProxies -> ShowS
[GetProxies] -> ShowS
GetProxies -> String
(Int -> GetProxies -> ShowS)
-> (GetProxies -> String)
-> ([GetProxies] -> ShowS)
-> Show GetProxies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetProxies -> ShowS
showsPrec :: Int -> GetProxies -> ShowS
$cshow :: GetProxies -> String
show :: GetProxies -> String
$cshowList :: [GetProxies] -> ShowS
showList :: [GetProxies] -> ShowS
Show)

instance I.ShortShow GetProxies where
  shortShow :: GetProxies -> String
shortShow
    GetProxies
GetProxies
        = String
"GetProxies"

instance AT.ToJSON GetProxies where
  toJSON :: GetProxies -> Value
toJSON
    GetProxies
GetProxies
        = [Pair] -> Value
A.object
          [ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"getProxies"
          ]