{-# 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.ListedHostKey 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 ListedHostKey = ListedHostKey'
{
ListedHostKey -> Maybe POSIX
dateImported :: Prelude.Maybe Data.POSIX,
ListedHostKey -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ListedHostKey -> Maybe Text
fingerprint :: Prelude.Maybe Prelude.Text,
ListedHostKey -> Maybe Text
hostKeyId :: Prelude.Maybe Prelude.Text,
ListedHostKey -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
ListedHostKey -> Text
arn :: Prelude.Text
}
deriving (ListedHostKey -> ListedHostKey -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListedHostKey -> ListedHostKey -> Bool
$c/= :: ListedHostKey -> ListedHostKey -> Bool
== :: ListedHostKey -> ListedHostKey -> Bool
$c== :: ListedHostKey -> ListedHostKey -> Bool
Prelude.Eq, ReadPrec [ListedHostKey]
ReadPrec ListedHostKey
Int -> ReadS ListedHostKey
ReadS [ListedHostKey]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListedHostKey]
$creadListPrec :: ReadPrec [ListedHostKey]
readPrec :: ReadPrec ListedHostKey
$creadPrec :: ReadPrec ListedHostKey
readList :: ReadS [ListedHostKey]
$creadList :: ReadS [ListedHostKey]
readsPrec :: Int -> ReadS ListedHostKey
$creadsPrec :: Int -> ReadS ListedHostKey
Prelude.Read, Int -> ListedHostKey -> ShowS
[ListedHostKey] -> ShowS
ListedHostKey -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListedHostKey] -> ShowS
$cshowList :: [ListedHostKey] -> ShowS
show :: ListedHostKey -> String
$cshow :: ListedHostKey -> String
showsPrec :: Int -> ListedHostKey -> ShowS
$cshowsPrec :: Int -> ListedHostKey -> ShowS
Prelude.Show, forall x. Rep ListedHostKey x -> ListedHostKey
forall x. ListedHostKey -> Rep ListedHostKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListedHostKey x -> ListedHostKey
$cfrom :: forall x. ListedHostKey -> Rep ListedHostKey x
Prelude.Generic)
newListedHostKey ::
Prelude.Text ->
ListedHostKey
newListedHostKey :: Text -> ListedHostKey
newListedHostKey Text
pArn_ =
ListedHostKey'
{ $sel:dateImported:ListedHostKey' :: Maybe POSIX
dateImported = forall a. Maybe a
Prelude.Nothing,
$sel:description:ListedHostKey' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:fingerprint:ListedHostKey' :: Maybe Text
fingerprint = forall a. Maybe a
Prelude.Nothing,
$sel:hostKeyId:ListedHostKey' :: Maybe Text
hostKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:type':ListedHostKey' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing,
$sel:arn:ListedHostKey' :: Text
arn = Text
pArn_
}
listedHostKey_dateImported :: Lens.Lens' ListedHostKey (Prelude.Maybe Prelude.UTCTime)
listedHostKey_dateImported :: Lens' ListedHostKey (Maybe UTCTime)
listedHostKey_dateImported = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedHostKey' {Maybe POSIX
dateImported :: Maybe POSIX
$sel:dateImported:ListedHostKey' :: ListedHostKey -> Maybe POSIX
dateImported} -> Maybe POSIX
dateImported) (\s :: ListedHostKey
s@ListedHostKey' {} Maybe POSIX
a -> ListedHostKey
s {$sel:dateImported:ListedHostKey' :: Maybe POSIX
dateImported = Maybe POSIX
a} :: ListedHostKey) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
listedHostKey_description :: Lens.Lens' ListedHostKey (Prelude.Maybe Prelude.Text)
listedHostKey_description :: Lens' ListedHostKey (Maybe Text)
listedHostKey_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedHostKey' {Maybe Text
description :: Maybe Text
$sel:description:ListedHostKey' :: ListedHostKey -> Maybe Text
description} -> Maybe Text
description) (\s :: ListedHostKey
s@ListedHostKey' {} Maybe Text
a -> ListedHostKey
s {$sel:description:ListedHostKey' :: Maybe Text
description = Maybe Text
a} :: ListedHostKey)
listedHostKey_fingerprint :: Lens.Lens' ListedHostKey (Prelude.Maybe Prelude.Text)
listedHostKey_fingerprint :: Lens' ListedHostKey (Maybe Text)
listedHostKey_fingerprint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedHostKey' {Maybe Text
fingerprint :: Maybe Text
$sel:fingerprint:ListedHostKey' :: ListedHostKey -> Maybe Text
fingerprint} -> Maybe Text
fingerprint) (\s :: ListedHostKey
s@ListedHostKey' {} Maybe Text
a -> ListedHostKey
s {$sel:fingerprint:ListedHostKey' :: Maybe Text
fingerprint = Maybe Text
a} :: ListedHostKey)
listedHostKey_hostKeyId :: Lens.Lens' ListedHostKey (Prelude.Maybe Prelude.Text)
listedHostKey_hostKeyId :: Lens' ListedHostKey (Maybe Text)
listedHostKey_hostKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedHostKey' {Maybe Text
hostKeyId :: Maybe Text
$sel:hostKeyId:ListedHostKey' :: ListedHostKey -> Maybe Text
hostKeyId} -> Maybe Text
hostKeyId) (\s :: ListedHostKey
s@ListedHostKey' {} Maybe Text
a -> ListedHostKey
s {$sel:hostKeyId:ListedHostKey' :: Maybe Text
hostKeyId = Maybe Text
a} :: ListedHostKey)
listedHostKey_type :: Lens.Lens' ListedHostKey (Prelude.Maybe Prelude.Text)
listedHostKey_type :: Lens' ListedHostKey (Maybe Text)
listedHostKey_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedHostKey' {Maybe Text
type' :: Maybe Text
$sel:type':ListedHostKey' :: ListedHostKey -> Maybe Text
type'} -> Maybe Text
type') (\s :: ListedHostKey
s@ListedHostKey' {} Maybe Text
a -> ListedHostKey
s {$sel:type':ListedHostKey' :: Maybe Text
type' = Maybe Text
a} :: ListedHostKey)
listedHostKey_arn :: Lens.Lens' ListedHostKey Prelude.Text
listedHostKey_arn :: Lens' ListedHostKey Text
listedHostKey_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedHostKey' {Text
arn :: Text
$sel:arn:ListedHostKey' :: ListedHostKey -> Text
arn} -> Text
arn) (\s :: ListedHostKey
s@ListedHostKey' {} Text
a -> ListedHostKey
s {$sel:arn:ListedHostKey' :: Text
arn = Text
a} :: ListedHostKey)
instance Data.FromJSON ListedHostKey where
parseJSON :: Value -> Parser ListedHostKey
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListedHostKey"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> ListedHostKey
ListedHostKey'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe 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 (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Fingerprint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HostKeyId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Type")
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
"Arn")
)
instance Prelude.Hashable ListedHostKey where
hashWithSalt :: Int -> ListedHostKey -> Int
hashWithSalt Int
_salt ListedHostKey' {Maybe Text
Maybe POSIX
Text
arn :: Text
type' :: Maybe Text
hostKeyId :: Maybe Text
fingerprint :: Maybe Text
description :: Maybe Text
dateImported :: Maybe POSIX
$sel:arn:ListedHostKey' :: ListedHostKey -> Text
$sel:type':ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:hostKeyId:ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:fingerprint:ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:description:ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:dateImported:ListedHostKey' :: ListedHostKey -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
dateImported
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fingerprint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData ListedHostKey where
rnf :: ListedHostKey -> ()
rnf ListedHostKey' {Maybe Text
Maybe POSIX
Text
arn :: Text
type' :: Maybe Text
hostKeyId :: Maybe Text
fingerprint :: Maybe Text
description :: Maybe Text
dateImported :: Maybe POSIX
$sel:arn:ListedHostKey' :: ListedHostKey -> Text
$sel:type':ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:hostKeyId:ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:fingerprint:ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:description:ListedHostKey' :: ListedHostKey -> Maybe Text
$sel:dateImported:ListedHostKey' :: ListedHostKey -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
dateImported
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fingerprint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn