{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transfer.Types.SshPublicKey where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SshPublicKey = SshPublicKey'
{
SshPublicKey -> POSIX
dateImported :: Data.POSIX,
SshPublicKey -> Text
sshPublicKeyBody :: Prelude.Text,
SshPublicKey -> Text
sshPublicKeyId :: Prelude.Text
}
deriving (SshPublicKey -> SshPublicKey -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SshPublicKey -> SshPublicKey -> Bool
$c/= :: SshPublicKey -> SshPublicKey -> Bool
== :: SshPublicKey -> SshPublicKey -> Bool
$c== :: SshPublicKey -> SshPublicKey -> Bool
Prelude.Eq, ReadPrec [SshPublicKey]
ReadPrec SshPublicKey
Int -> ReadS SshPublicKey
ReadS [SshPublicKey]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SshPublicKey]
$creadListPrec :: ReadPrec [SshPublicKey]
readPrec :: ReadPrec SshPublicKey
$creadPrec :: ReadPrec SshPublicKey
readList :: ReadS [SshPublicKey]
$creadList :: ReadS [SshPublicKey]
readsPrec :: Int -> ReadS SshPublicKey
$creadsPrec :: Int -> ReadS SshPublicKey
Prelude.Read, Int -> SshPublicKey -> ShowS
[SshPublicKey] -> ShowS
SshPublicKey -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SshPublicKey] -> ShowS
$cshowList :: [SshPublicKey] -> ShowS
show :: SshPublicKey -> String
$cshow :: SshPublicKey -> String
showsPrec :: Int -> SshPublicKey -> ShowS
$cshowsPrec :: Int -> SshPublicKey -> ShowS
Prelude.Show, forall x. Rep SshPublicKey x -> SshPublicKey
forall x. SshPublicKey -> Rep SshPublicKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SshPublicKey x -> SshPublicKey
$cfrom :: forall x. SshPublicKey -> Rep SshPublicKey x
Prelude.Generic)
newSshPublicKey ::
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
SshPublicKey
newSshPublicKey :: UTCTime -> Text -> Text -> SshPublicKey
newSshPublicKey
UTCTime
pDateImported_
Text
pSshPublicKeyBody_
Text
pSshPublicKeyId_ =
SshPublicKey'
{ $sel:dateImported:SshPublicKey' :: POSIX
dateImported =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pDateImported_,
$sel:sshPublicKeyBody:SshPublicKey' :: Text
sshPublicKeyBody = Text
pSshPublicKeyBody_,
$sel:sshPublicKeyId:SshPublicKey' :: Text
sshPublicKeyId = Text
pSshPublicKeyId_
}
sshPublicKey_dateImported :: Lens.Lens' SshPublicKey Prelude.UTCTime
sshPublicKey_dateImported :: Lens' SshPublicKey UTCTime
sshPublicKey_dateImported = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SshPublicKey' {POSIX
dateImported :: POSIX
$sel:dateImported:SshPublicKey' :: SshPublicKey -> POSIX
dateImported} -> POSIX
dateImported) (\s :: SshPublicKey
s@SshPublicKey' {} POSIX
a -> SshPublicKey
s {$sel:dateImported:SshPublicKey' :: POSIX
dateImported = POSIX
a} :: SshPublicKey) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
sshPublicKey_sshPublicKeyBody :: Lens.Lens' SshPublicKey Prelude.Text
sshPublicKey_sshPublicKeyBody :: Lens' SshPublicKey Text
sshPublicKey_sshPublicKeyBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SshPublicKey' {Text
sshPublicKeyBody :: Text
$sel:sshPublicKeyBody:SshPublicKey' :: SshPublicKey -> Text
sshPublicKeyBody} -> Text
sshPublicKeyBody) (\s :: SshPublicKey
s@SshPublicKey' {} Text
a -> SshPublicKey
s {$sel:sshPublicKeyBody:SshPublicKey' :: Text
sshPublicKeyBody = Text
a} :: SshPublicKey)
sshPublicKey_sshPublicKeyId :: Lens.Lens' SshPublicKey Prelude.Text
sshPublicKey_sshPublicKeyId :: Lens' SshPublicKey Text
sshPublicKey_sshPublicKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SshPublicKey' {Text
sshPublicKeyId :: Text
$sel:sshPublicKeyId:SshPublicKey' :: SshPublicKey -> Text
sshPublicKeyId} -> Text
sshPublicKeyId) (\s :: SshPublicKey
s@SshPublicKey' {} Text
a -> SshPublicKey
s {$sel:sshPublicKeyId:SshPublicKey' :: Text
sshPublicKeyId = Text
a} :: SshPublicKey)
instance Data.FromJSON SshPublicKey where
parseJSON :: Value -> Parser SshPublicKey
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SshPublicKey"
( \Object
x ->
POSIX -> Text -> Text -> SshPublicKey
SshPublicKey'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DateImported")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SshPublicKeyBody")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SshPublicKeyId")
)
instance Prelude.Hashable SshPublicKey where
hashWithSalt :: Int -> SshPublicKey -> Int
hashWithSalt Int
_salt SshPublicKey' {Text
POSIX
sshPublicKeyId :: Text
sshPublicKeyBody :: Text
dateImported :: POSIX
$sel:sshPublicKeyId:SshPublicKey' :: SshPublicKey -> Text
$sel:sshPublicKeyBody:SshPublicKey' :: SshPublicKey -> Text
$sel:dateImported:SshPublicKey' :: SshPublicKey -> POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
dateImported
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sshPublicKeyBody
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sshPublicKeyId
instance Prelude.NFData SshPublicKey where
rnf :: SshPublicKey -> ()
rnf SshPublicKey' {Text
POSIX
sshPublicKeyId :: Text
sshPublicKeyBody :: Text
dateImported :: POSIX
$sel:sshPublicKeyId:SshPublicKey' :: SshPublicKey -> Text
$sel:sshPublicKeyBody:SshPublicKey' :: SshPublicKey -> Text
$sel:dateImported:SshPublicKey' :: SshPublicKey -> POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf POSIX
dateImported
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sshPublicKeyBody
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sshPublicKeyId