-----------------------------------------------------------------------------
-- |
-- License     :  BSD-3-Clause
-- Maintainer  :  Todd Mohney <toddmohney@gmail.com>
--
module GitHub.Data.PublicSSHKeys where

import GitHub.Data.Id          (Id)
import GitHub.Data.URL         (URL)
import GitHub.Internal.Prelude
import Prelude ()

data PublicSSHKeyBasic = PublicSSHKeyBasic
    { PublicSSHKeyBasic -> Id PublicSSHKey
basicPublicSSHKeyId        :: !(Id PublicSSHKey)
    , PublicSSHKeyBasic -> Text
basicPublicSSHKeyKey       :: !Text
    }
  deriving (Int -> PublicSSHKeyBasic -> ShowS
[PublicSSHKeyBasic] -> ShowS
PublicSSHKeyBasic -> String
(Int -> PublicSSHKeyBasic -> ShowS)
-> (PublicSSHKeyBasic -> String)
-> ([PublicSSHKeyBasic] -> ShowS)
-> Show PublicSSHKeyBasic
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublicSSHKeyBasic -> ShowS
showsPrec :: Int -> PublicSSHKeyBasic -> ShowS
$cshow :: PublicSSHKeyBasic -> String
show :: PublicSSHKeyBasic -> String
$cshowList :: [PublicSSHKeyBasic] -> ShowS
showList :: [PublicSSHKeyBasic] -> ShowS
Show, Typeable PublicSSHKeyBasic
Typeable PublicSSHKeyBasic =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g)
 -> PublicSSHKeyBasic
 -> c PublicSSHKeyBasic)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c PublicSSHKeyBasic)
-> (PublicSSHKeyBasic -> Constr)
-> (PublicSSHKeyBasic -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c PublicSSHKeyBasic))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c PublicSSHKeyBasic))
-> ((forall b. Data b => b -> b)
    -> PublicSSHKeyBasic -> PublicSSHKeyBasic)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> PublicSSHKeyBasic -> m PublicSSHKeyBasic)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> PublicSSHKeyBasic -> m PublicSSHKeyBasic)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> PublicSSHKeyBasic -> m PublicSSHKeyBasic)
-> Data PublicSSHKeyBasic
PublicSSHKeyBasic -> Constr
PublicSSHKeyBasic -> DataType
(forall b. Data b => b -> b)
-> PublicSSHKeyBasic -> PublicSSHKeyBasic
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> u
forall u. (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicSSHKeyBasic
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicSSHKeyBasic -> c PublicSSHKeyBasic
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicSSHKeyBasic)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicSSHKeyBasic)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicSSHKeyBasic -> c PublicSSHKeyBasic
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicSSHKeyBasic -> c PublicSSHKeyBasic
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicSSHKeyBasic
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicSSHKeyBasic
$ctoConstr :: PublicSSHKeyBasic -> Constr
toConstr :: PublicSSHKeyBasic -> Constr
$cdataTypeOf :: PublicSSHKeyBasic -> DataType
dataTypeOf :: PublicSSHKeyBasic -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicSSHKeyBasic)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicSSHKeyBasic)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicSSHKeyBasic)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicSSHKeyBasic)
$cgmapT :: (forall b. Data b => b -> b)
-> PublicSSHKeyBasic -> PublicSSHKeyBasic
gmapT :: (forall b. Data b => b -> b)
-> PublicSSHKeyBasic -> PublicSSHKeyBasic
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKeyBasic -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PublicSSHKeyBasic -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PublicSSHKeyBasic -> m PublicSSHKeyBasic
Data, Typeable, PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
(PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool)
-> Eq PublicSSHKeyBasic
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
== :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
$c/= :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
/= :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
Eq, Eq PublicSSHKeyBasic
Eq PublicSSHKeyBasic =>
(PublicSSHKeyBasic -> PublicSSHKeyBasic -> Ordering)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic)
-> (PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic)
-> Ord PublicSSHKeyBasic
PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
PublicSSHKeyBasic -> PublicSSHKeyBasic -> Ordering
PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic
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 :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Ordering
compare :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Ordering
$c< :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
< :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
$c<= :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
<= :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
$c> :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
> :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
$c>= :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
>= :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> Bool
$cmax :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic
max :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic
$cmin :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic
min :: PublicSSHKeyBasic -> PublicSSHKeyBasic -> PublicSSHKeyBasic
Ord, (forall x. PublicSSHKeyBasic -> Rep PublicSSHKeyBasic x)
-> (forall x. Rep PublicSSHKeyBasic x -> PublicSSHKeyBasic)
-> Generic PublicSSHKeyBasic
forall x. Rep PublicSSHKeyBasic x -> PublicSSHKeyBasic
forall x. PublicSSHKeyBasic -> Rep PublicSSHKeyBasic x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. PublicSSHKeyBasic -> Rep PublicSSHKeyBasic x
from :: forall x. PublicSSHKeyBasic -> Rep PublicSSHKeyBasic x
$cto :: forall x. Rep PublicSSHKeyBasic x -> PublicSSHKeyBasic
to :: forall x. Rep PublicSSHKeyBasic x -> PublicSSHKeyBasic
Generic)

instance FromJSON PublicSSHKeyBasic where
    parseJSON :: Value -> Parser PublicSSHKeyBasic
parseJSON = String
-> (Object -> Parser PublicSSHKeyBasic)
-> Value
-> Parser PublicSSHKeyBasic
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PublicSSHKeyBasic" ((Object -> Parser PublicSSHKeyBasic)
 -> Value -> Parser PublicSSHKeyBasic)
-> (Object -> Parser PublicSSHKeyBasic)
-> Value
-> Parser PublicSSHKeyBasic
forall a b. (a -> b) -> a -> b
$ \Object
o -> Id PublicSSHKey -> Text -> PublicSSHKeyBasic
PublicSSHKeyBasic
        (Id PublicSSHKey -> Text -> PublicSSHKeyBasic)
-> Parser (Id PublicSSHKey) -> Parser (Text -> PublicSSHKeyBasic)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Id PublicSSHKey)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        Parser (Text -> PublicSSHKeyBasic)
-> Parser Text -> Parser PublicSSHKeyBasic
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"key"

data PublicSSHKey = PublicSSHKey
    { PublicSSHKey -> Id PublicSSHKey
publicSSHKeyId        :: !(Id PublicSSHKey)
    , PublicSSHKey -> Text
publicSSHKeyKey       :: !Text
    , PublicSSHKey -> URL
publicSSHKeyUrl       :: !URL
    , PublicSSHKey -> Text
publicSSHKeyTitle     :: !Text
    , PublicSSHKey -> Bool
publicSSHKeyVerified  :: !Bool
    , PublicSSHKey -> Maybe UTCTime
publicSSHKeyCreatedAt :: !(Maybe UTCTime)
    , PublicSSHKey -> Bool
publicSSHKeyReadOnly  :: !Bool
    }
  deriving (Int -> PublicSSHKey -> ShowS
[PublicSSHKey] -> ShowS
PublicSSHKey -> String
(Int -> PublicSSHKey -> ShowS)
-> (PublicSSHKey -> String)
-> ([PublicSSHKey] -> ShowS)
-> Show PublicSSHKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublicSSHKey -> ShowS
showsPrec :: Int -> PublicSSHKey -> ShowS
$cshow :: PublicSSHKey -> String
show :: PublicSSHKey -> String
$cshowList :: [PublicSSHKey] -> ShowS
showList :: [PublicSSHKey] -> ShowS
Show, Typeable PublicSSHKey
Typeable PublicSSHKey =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> PublicSSHKey -> c PublicSSHKey)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c PublicSSHKey)
-> (PublicSSHKey -> Constr)
-> (PublicSSHKey -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c PublicSSHKey))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c PublicSSHKey))
-> ((forall b. Data b => b -> b) -> PublicSSHKey -> PublicSSHKey)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r)
-> (forall u. (forall d. Data d => d -> u) -> PublicSSHKey -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> PublicSSHKey -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey)
-> Data PublicSSHKey
PublicSSHKey -> Constr
PublicSSHKey -> DataType
(forall b. Data b => b -> b) -> PublicSSHKey -> PublicSSHKey
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> PublicSSHKey -> u
forall u. (forall d. Data d => d -> u) -> PublicSSHKey -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicSSHKey
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicSSHKey -> c PublicSSHKey
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicSSHKey)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicSSHKey)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicSSHKey -> c PublicSSHKey
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PublicSSHKey -> c PublicSSHKey
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicSSHKey
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PublicSSHKey
$ctoConstr :: PublicSSHKey -> Constr
toConstr :: PublicSSHKey -> Constr
$cdataTypeOf :: PublicSSHKey -> DataType
dataTypeOf :: PublicSSHKey -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicSSHKey)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PublicSSHKey)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicSSHKey)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PublicSSHKey)
$cgmapT :: (forall b. Data b => b -> b) -> PublicSSHKey -> PublicSSHKey
gmapT :: (forall b. Data b => b -> b) -> PublicSSHKey -> PublicSSHKey
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PublicSSHKey -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PublicSSHKey -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> PublicSSHKey -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PublicSSHKey -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PublicSSHKey -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PublicSSHKey -> m PublicSSHKey
Data, Typeable, PublicSSHKey -> PublicSSHKey -> Bool
(PublicSSHKey -> PublicSSHKey -> Bool)
-> (PublicSSHKey -> PublicSSHKey -> Bool) -> Eq PublicSSHKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublicSSHKey -> PublicSSHKey -> Bool
== :: PublicSSHKey -> PublicSSHKey -> Bool
$c/= :: PublicSSHKey -> PublicSSHKey -> Bool
/= :: PublicSSHKey -> PublicSSHKey -> Bool
Eq, Eq PublicSSHKey
Eq PublicSSHKey =>
(PublicSSHKey -> PublicSSHKey -> Ordering)
-> (PublicSSHKey -> PublicSSHKey -> Bool)
-> (PublicSSHKey -> PublicSSHKey -> Bool)
-> (PublicSSHKey -> PublicSSHKey -> Bool)
-> (PublicSSHKey -> PublicSSHKey -> Bool)
-> (PublicSSHKey -> PublicSSHKey -> PublicSSHKey)
-> (PublicSSHKey -> PublicSSHKey -> PublicSSHKey)
-> Ord PublicSSHKey
PublicSSHKey -> PublicSSHKey -> Bool
PublicSSHKey -> PublicSSHKey -> Ordering
PublicSSHKey -> PublicSSHKey -> PublicSSHKey
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 :: PublicSSHKey -> PublicSSHKey -> Ordering
compare :: PublicSSHKey -> PublicSSHKey -> Ordering
$c< :: PublicSSHKey -> PublicSSHKey -> Bool
< :: PublicSSHKey -> PublicSSHKey -> Bool
$c<= :: PublicSSHKey -> PublicSSHKey -> Bool
<= :: PublicSSHKey -> PublicSSHKey -> Bool
$c> :: PublicSSHKey -> PublicSSHKey -> Bool
> :: PublicSSHKey -> PublicSSHKey -> Bool
$c>= :: PublicSSHKey -> PublicSSHKey -> Bool
>= :: PublicSSHKey -> PublicSSHKey -> Bool
$cmax :: PublicSSHKey -> PublicSSHKey -> PublicSSHKey
max :: PublicSSHKey -> PublicSSHKey -> PublicSSHKey
$cmin :: PublicSSHKey -> PublicSSHKey -> PublicSSHKey
min :: PublicSSHKey -> PublicSSHKey -> PublicSSHKey
Ord, (forall x. PublicSSHKey -> Rep PublicSSHKey x)
-> (forall x. Rep PublicSSHKey x -> PublicSSHKey)
-> Generic PublicSSHKey
forall x. Rep PublicSSHKey x -> PublicSSHKey
forall x. PublicSSHKey -> Rep PublicSSHKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. PublicSSHKey -> Rep PublicSSHKey x
from :: forall x. PublicSSHKey -> Rep PublicSSHKey x
$cto :: forall x. Rep PublicSSHKey x -> PublicSSHKey
to :: forall x. Rep PublicSSHKey x -> PublicSSHKey
Generic)

instance FromJSON PublicSSHKey where
    parseJSON :: Value -> Parser PublicSSHKey
parseJSON = String
-> (Object -> Parser PublicSSHKey) -> Value -> Parser PublicSSHKey
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PublicSSHKey" ((Object -> Parser PublicSSHKey) -> Value -> Parser PublicSSHKey)
-> (Object -> Parser PublicSSHKey) -> Value -> Parser PublicSSHKey
forall a b. (a -> b) -> a -> b
$ \Object
o -> Id PublicSSHKey
-> Text
-> URL
-> Text
-> Bool
-> Maybe UTCTime
-> Bool
-> PublicSSHKey
PublicSSHKey
        (Id PublicSSHKey
 -> Text
 -> URL
 -> Text
 -> Bool
 -> Maybe UTCTime
 -> Bool
 -> PublicSSHKey)
-> Parser (Id PublicSSHKey)
-> Parser
     (Text
      -> URL -> Text -> Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Id PublicSSHKey)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        Parser
  (Text
   -> URL -> Text -> Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
-> Parser Text
-> Parser
     (URL -> Text -> Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"key"
        Parser
  (URL -> Text -> Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
-> Parser URL
-> Parser (Text -> Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
        Parser (Text -> Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
-> Parser Text
-> Parser (Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"title"
        Parser (Bool -> Maybe UTCTime -> Bool -> PublicSSHKey)
-> Parser Bool -> Parser (Maybe UTCTime -> Bool -> PublicSSHKey)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"verified"
        Parser (Maybe UTCTime -> Bool -> PublicSSHKey)
-> Parser (Maybe UTCTime) -> Parser (Bool -> PublicSSHKey)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe UTCTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"created_at"
        Parser (Bool -> PublicSSHKey) -> Parser Bool -> Parser PublicSSHKey
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"read_only"

data NewPublicSSHKey = NewPublicSSHKey
    { NewPublicSSHKey -> Text
newPublicSSHKeyKey      :: !Text
    , NewPublicSSHKey -> Text
newPublicSSHKeyTitle    :: !Text
    }
  deriving (Int -> NewPublicSSHKey -> ShowS
[NewPublicSSHKey] -> ShowS
NewPublicSSHKey -> String
(Int -> NewPublicSSHKey -> ShowS)
-> (NewPublicSSHKey -> String)
-> ([NewPublicSSHKey] -> ShowS)
-> Show NewPublicSSHKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NewPublicSSHKey -> ShowS
showsPrec :: Int -> NewPublicSSHKey -> ShowS
$cshow :: NewPublicSSHKey -> String
show :: NewPublicSSHKey -> String
$cshowList :: [NewPublicSSHKey] -> ShowS
showList :: [NewPublicSSHKey] -> ShowS
Show, Typeable NewPublicSSHKey
Typeable NewPublicSSHKey =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> NewPublicSSHKey -> c NewPublicSSHKey)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c NewPublicSSHKey)
-> (NewPublicSSHKey -> Constr)
-> (NewPublicSSHKey -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c NewPublicSSHKey))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c NewPublicSSHKey))
-> ((forall b. Data b => b -> b)
    -> NewPublicSSHKey -> NewPublicSSHKey)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> NewPublicSSHKey -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> NewPublicSSHKey -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> NewPublicSSHKey -> m NewPublicSSHKey)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> NewPublicSSHKey -> m NewPublicSSHKey)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> NewPublicSSHKey -> m NewPublicSSHKey)
-> Data NewPublicSSHKey
NewPublicSSHKey -> Constr
NewPublicSSHKey -> DataType
(forall b. Data b => b -> b) -> NewPublicSSHKey -> NewPublicSSHKey
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> NewPublicSSHKey -> u
forall u. (forall d. Data d => d -> u) -> NewPublicSSHKey -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewPublicSSHKey
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewPublicSSHKey -> c NewPublicSSHKey
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewPublicSSHKey)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NewPublicSSHKey)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewPublicSSHKey -> c NewPublicSSHKey
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewPublicSSHKey -> c NewPublicSSHKey
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewPublicSSHKey
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewPublicSSHKey
$ctoConstr :: NewPublicSSHKey -> Constr
toConstr :: NewPublicSSHKey -> Constr
$cdataTypeOf :: NewPublicSSHKey -> DataType
dataTypeOf :: NewPublicSSHKey -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewPublicSSHKey)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewPublicSSHKey)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NewPublicSSHKey)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NewPublicSSHKey)
$cgmapT :: (forall b. Data b => b -> b) -> NewPublicSSHKey -> NewPublicSSHKey
gmapT :: (forall b. Data b => b -> b) -> NewPublicSSHKey -> NewPublicSSHKey
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewPublicSSHKey -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NewPublicSSHKey -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NewPublicSSHKey -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> NewPublicSSHKey -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> NewPublicSSHKey -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> NewPublicSSHKey -> m NewPublicSSHKey
Data, Typeable, NewPublicSSHKey -> NewPublicSSHKey -> Bool
(NewPublicSSHKey -> NewPublicSSHKey -> Bool)
-> (NewPublicSSHKey -> NewPublicSSHKey -> Bool)
-> Eq NewPublicSSHKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
== :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
$c/= :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
/= :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
Eq, Eq NewPublicSSHKey
Eq NewPublicSSHKey =>
(NewPublicSSHKey -> NewPublicSSHKey -> Ordering)
-> (NewPublicSSHKey -> NewPublicSSHKey -> Bool)
-> (NewPublicSSHKey -> NewPublicSSHKey -> Bool)
-> (NewPublicSSHKey -> NewPublicSSHKey -> Bool)
-> (NewPublicSSHKey -> NewPublicSSHKey -> Bool)
-> (NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey)
-> (NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey)
-> Ord NewPublicSSHKey
NewPublicSSHKey -> NewPublicSSHKey -> Bool
NewPublicSSHKey -> NewPublicSSHKey -> Ordering
NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey
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 :: NewPublicSSHKey -> NewPublicSSHKey -> Ordering
compare :: NewPublicSSHKey -> NewPublicSSHKey -> Ordering
$c< :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
< :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
$c<= :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
<= :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
$c> :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
> :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
$c>= :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
>= :: NewPublicSSHKey -> NewPublicSSHKey -> Bool
$cmax :: NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey
max :: NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey
$cmin :: NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey
min :: NewPublicSSHKey -> NewPublicSSHKey -> NewPublicSSHKey
Ord, (forall x. NewPublicSSHKey -> Rep NewPublicSSHKey x)
-> (forall x. Rep NewPublicSSHKey x -> NewPublicSSHKey)
-> Generic NewPublicSSHKey
forall x. Rep NewPublicSSHKey x -> NewPublicSSHKey
forall x. NewPublicSSHKey -> Rep NewPublicSSHKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NewPublicSSHKey -> Rep NewPublicSSHKey x
from :: forall x. NewPublicSSHKey -> Rep NewPublicSSHKey x
$cto :: forall x. Rep NewPublicSSHKey x -> NewPublicSSHKey
to :: forall x. Rep NewPublicSSHKey x -> NewPublicSSHKey
Generic)

instance ToJSON NewPublicSSHKey where
    toJSON :: NewPublicSSHKey -> Value
toJSON (NewPublicSSHKey Text
key Text
title) = [Pair] -> Value
object
        [ Key
"key" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Text
key
        , Key
"title" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
.= Text
title
        ]

instance FromJSON NewPublicSSHKey where
    parseJSON :: Value -> Parser NewPublicSSHKey
parseJSON = String
-> (Object -> Parser NewPublicSSHKey)
-> Value
-> Parser NewPublicSSHKey
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"PublicSSHKey" ((Object -> Parser NewPublicSSHKey)
 -> Value -> Parser NewPublicSSHKey)
-> (Object -> Parser NewPublicSSHKey)
-> Value
-> Parser NewPublicSSHKey
forall a b. (a -> b) -> a -> b
$ \Object
o -> Text -> Text -> NewPublicSSHKey
NewPublicSSHKey
        (Text -> Text -> NewPublicSSHKey)
-> Parser Text -> Parser (Text -> NewPublicSSHKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"key"
        Parser (Text -> NewPublicSSHKey)
-> Parser Text -> Parser NewPublicSSHKey
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"title"