{-# 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.DescribedHostKey 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
import Amazonka.Transfer.Types.Tag
data DescribedHostKey = DescribedHostKey'
{
DescribedHostKey -> Maybe POSIX
dateImported :: Prelude.Maybe Data.POSIX,
DescribedHostKey -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
DescribedHostKey -> Maybe Text
hostKeyFingerprint :: Prelude.Maybe Prelude.Text,
DescribedHostKey -> Maybe Text
hostKeyId :: Prelude.Maybe Prelude.Text,
DescribedHostKey -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
DescribedHostKey -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
DescribedHostKey -> Text
arn :: Prelude.Text
}
deriving (DescribedHostKey -> DescribedHostKey -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribedHostKey -> DescribedHostKey -> Bool
$c/= :: DescribedHostKey -> DescribedHostKey -> Bool
== :: DescribedHostKey -> DescribedHostKey -> Bool
$c== :: DescribedHostKey -> DescribedHostKey -> Bool
Prelude.Eq, ReadPrec [DescribedHostKey]
ReadPrec DescribedHostKey
Int -> ReadS DescribedHostKey
ReadS [DescribedHostKey]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribedHostKey]
$creadListPrec :: ReadPrec [DescribedHostKey]
readPrec :: ReadPrec DescribedHostKey
$creadPrec :: ReadPrec DescribedHostKey
readList :: ReadS [DescribedHostKey]
$creadList :: ReadS [DescribedHostKey]
readsPrec :: Int -> ReadS DescribedHostKey
$creadsPrec :: Int -> ReadS DescribedHostKey
Prelude.Read, Int -> DescribedHostKey -> ShowS
[DescribedHostKey] -> ShowS
DescribedHostKey -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribedHostKey] -> ShowS
$cshowList :: [DescribedHostKey] -> ShowS
show :: DescribedHostKey -> String
$cshow :: DescribedHostKey -> String
showsPrec :: Int -> DescribedHostKey -> ShowS
$cshowsPrec :: Int -> DescribedHostKey -> ShowS
Prelude.Show, forall x. Rep DescribedHostKey x -> DescribedHostKey
forall x. DescribedHostKey -> Rep DescribedHostKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribedHostKey x -> DescribedHostKey
$cfrom :: forall x. DescribedHostKey -> Rep DescribedHostKey x
Prelude.Generic)
newDescribedHostKey ::
Prelude.Text ->
DescribedHostKey
newDescribedHostKey :: Text -> DescribedHostKey
newDescribedHostKey Text
pArn_ =
DescribedHostKey'
{ $sel:dateImported:DescribedHostKey' :: Maybe POSIX
dateImported = forall a. Maybe a
Prelude.Nothing,
$sel:description:DescribedHostKey' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:hostKeyFingerprint:DescribedHostKey' :: Maybe Text
hostKeyFingerprint = forall a. Maybe a
Prelude.Nothing,
$sel:hostKeyId:DescribedHostKey' :: Maybe Text
hostKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:DescribedHostKey' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:type':DescribedHostKey' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing,
$sel:arn:DescribedHostKey' :: Text
arn = Text
pArn_
}
describedHostKey_dateImported :: Lens.Lens' DescribedHostKey (Prelude.Maybe Prelude.UTCTime)
describedHostKey_dateImported :: Lens' DescribedHostKey (Maybe UTCTime)
describedHostKey_dateImported = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Maybe POSIX
dateImported :: Maybe POSIX
$sel:dateImported:DescribedHostKey' :: DescribedHostKey -> Maybe POSIX
dateImported} -> Maybe POSIX
dateImported) (\s :: DescribedHostKey
s@DescribedHostKey' {} Maybe POSIX
a -> DescribedHostKey
s {$sel:dateImported:DescribedHostKey' :: Maybe POSIX
dateImported = Maybe POSIX
a} :: DescribedHostKey) 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
describedHostKey_description :: Lens.Lens' DescribedHostKey (Prelude.Maybe Prelude.Text)
describedHostKey_description :: Lens' DescribedHostKey (Maybe Text)
describedHostKey_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Maybe Text
description :: Maybe Text
$sel:description:DescribedHostKey' :: DescribedHostKey -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribedHostKey
s@DescribedHostKey' {} Maybe Text
a -> DescribedHostKey
s {$sel:description:DescribedHostKey' :: Maybe Text
description = Maybe Text
a} :: DescribedHostKey)
describedHostKey_hostKeyFingerprint :: Lens.Lens' DescribedHostKey (Prelude.Maybe Prelude.Text)
describedHostKey_hostKeyFingerprint :: Lens' DescribedHostKey (Maybe Text)
describedHostKey_hostKeyFingerprint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Maybe Text
hostKeyFingerprint :: Maybe Text
$sel:hostKeyFingerprint:DescribedHostKey' :: DescribedHostKey -> Maybe Text
hostKeyFingerprint} -> Maybe Text
hostKeyFingerprint) (\s :: DescribedHostKey
s@DescribedHostKey' {} Maybe Text
a -> DescribedHostKey
s {$sel:hostKeyFingerprint:DescribedHostKey' :: Maybe Text
hostKeyFingerprint = Maybe Text
a} :: DescribedHostKey)
describedHostKey_hostKeyId :: Lens.Lens' DescribedHostKey (Prelude.Maybe Prelude.Text)
describedHostKey_hostKeyId :: Lens' DescribedHostKey (Maybe Text)
describedHostKey_hostKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Maybe Text
hostKeyId :: Maybe Text
$sel:hostKeyId:DescribedHostKey' :: DescribedHostKey -> Maybe Text
hostKeyId} -> Maybe Text
hostKeyId) (\s :: DescribedHostKey
s@DescribedHostKey' {} Maybe Text
a -> DescribedHostKey
s {$sel:hostKeyId:DescribedHostKey' :: Maybe Text
hostKeyId = Maybe Text
a} :: DescribedHostKey)
describedHostKey_tags :: Lens.Lens' DescribedHostKey (Prelude.Maybe (Prelude.NonEmpty Tag))
describedHostKey_tags :: Lens' DescribedHostKey (Maybe (NonEmpty Tag))
describedHostKey_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:DescribedHostKey' :: DescribedHostKey -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: DescribedHostKey
s@DescribedHostKey' {} Maybe (NonEmpty Tag)
a -> DescribedHostKey
s {$sel:tags:DescribedHostKey' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: DescribedHostKey) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedHostKey_type :: Lens.Lens' DescribedHostKey (Prelude.Maybe Prelude.Text)
describedHostKey_type :: Lens' DescribedHostKey (Maybe Text)
describedHostKey_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Maybe Text
type' :: Maybe Text
$sel:type':DescribedHostKey' :: DescribedHostKey -> Maybe Text
type'} -> Maybe Text
type') (\s :: DescribedHostKey
s@DescribedHostKey' {} Maybe Text
a -> DescribedHostKey
s {$sel:type':DescribedHostKey' :: Maybe Text
type' = Maybe Text
a} :: DescribedHostKey)
describedHostKey_arn :: Lens.Lens' DescribedHostKey Prelude.Text
describedHostKey_arn :: Lens' DescribedHostKey Text
describedHostKey_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedHostKey' {Text
arn :: Text
$sel:arn:DescribedHostKey' :: DescribedHostKey -> Text
arn} -> Text
arn) (\s :: DescribedHostKey
s@DescribedHostKey' {} Text
a -> DescribedHostKey
s {$sel:arn:DescribedHostKey' :: Text
arn = Text
a} :: DescribedHostKey)
instance Data.FromJSON DescribedHostKey where
parseJSON :: Value -> Parser DescribedHostKey
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DescribedHostKey"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Maybe Text
-> Text
-> DescribedHostKey
DescribedHostKey'
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
"HostKeyFingerprint")
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
"Tags")
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 DescribedHostKey where
hashWithSalt :: Int -> DescribedHostKey -> Int
hashWithSalt Int
_salt DescribedHostKey' {Maybe (NonEmpty Tag)
Maybe Text
Maybe POSIX
Text
arn :: Text
type' :: Maybe Text
tags :: Maybe (NonEmpty Tag)
hostKeyId :: Maybe Text
hostKeyFingerprint :: Maybe Text
description :: Maybe Text
dateImported :: Maybe POSIX
$sel:arn:DescribedHostKey' :: DescribedHostKey -> Text
$sel:type':DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:tags:DescribedHostKey' :: DescribedHostKey -> Maybe (NonEmpty Tag)
$sel:hostKeyId:DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:hostKeyFingerprint:DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:description:DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:dateImported:DescribedHostKey' :: DescribedHostKey -> 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
hostKeyFingerprint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
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 DescribedHostKey where
rnf :: DescribedHostKey -> ()
rnf DescribedHostKey' {Maybe (NonEmpty Tag)
Maybe Text
Maybe POSIX
Text
arn :: Text
type' :: Maybe Text
tags :: Maybe (NonEmpty Tag)
hostKeyId :: Maybe Text
hostKeyFingerprint :: Maybe Text
description :: Maybe Text
dateImported :: Maybe POSIX
$sel:arn:DescribedHostKey' :: DescribedHostKey -> Text
$sel:type':DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:tags:DescribedHostKey' :: DescribedHostKey -> Maybe (NonEmpty Tag)
$sel:hostKeyId:DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:hostKeyFingerprint:DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:description:DescribedHostKey' :: DescribedHostKey -> Maybe Text
$sel:dateImported:DescribedHostKey' :: DescribedHostKey -> 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
hostKeyFingerprint
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 (NonEmpty Tag)
tags
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