{-# 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.ListedCertificate 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.CertificateStatusType
import Amazonka.Transfer.Types.CertificateType
import Amazonka.Transfer.Types.CertificateUsageType
data ListedCertificate = ListedCertificate'
{
ListedCertificate -> Maybe POSIX
activeDate :: Prelude.Maybe Data.POSIX,
ListedCertificate -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ListedCertificate -> Maybe Text
certificateId :: Prelude.Maybe Prelude.Text,
ListedCertificate -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ListedCertificate -> Maybe POSIX
inactiveDate :: Prelude.Maybe Data.POSIX,
ListedCertificate -> Maybe CertificateStatusType
status :: Prelude.Maybe CertificateStatusType,
ListedCertificate -> Maybe CertificateType
type' :: Prelude.Maybe CertificateType,
ListedCertificate -> Maybe CertificateUsageType
usage :: Prelude.Maybe CertificateUsageType
}
deriving (ListedCertificate -> ListedCertificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListedCertificate -> ListedCertificate -> Bool
$c/= :: ListedCertificate -> ListedCertificate -> Bool
== :: ListedCertificate -> ListedCertificate -> Bool
$c== :: ListedCertificate -> ListedCertificate -> Bool
Prelude.Eq, ReadPrec [ListedCertificate]
ReadPrec ListedCertificate
Int -> ReadS ListedCertificate
ReadS [ListedCertificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListedCertificate]
$creadListPrec :: ReadPrec [ListedCertificate]
readPrec :: ReadPrec ListedCertificate
$creadPrec :: ReadPrec ListedCertificate
readList :: ReadS [ListedCertificate]
$creadList :: ReadS [ListedCertificate]
readsPrec :: Int -> ReadS ListedCertificate
$creadsPrec :: Int -> ReadS ListedCertificate
Prelude.Read, Int -> ListedCertificate -> ShowS
[ListedCertificate] -> ShowS
ListedCertificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListedCertificate] -> ShowS
$cshowList :: [ListedCertificate] -> ShowS
show :: ListedCertificate -> String
$cshow :: ListedCertificate -> String
showsPrec :: Int -> ListedCertificate -> ShowS
$cshowsPrec :: Int -> ListedCertificate -> ShowS
Prelude.Show, forall x. Rep ListedCertificate x -> ListedCertificate
forall x. ListedCertificate -> Rep ListedCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListedCertificate x -> ListedCertificate
$cfrom :: forall x. ListedCertificate -> Rep ListedCertificate x
Prelude.Generic)
newListedCertificate ::
ListedCertificate
newListedCertificate :: ListedCertificate
newListedCertificate =
ListedCertificate'
{ $sel:activeDate:ListedCertificate' :: Maybe POSIX
activeDate = forall a. Maybe a
Prelude.Nothing,
$sel:arn:ListedCertificate' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:certificateId:ListedCertificate' :: Maybe Text
certificateId = forall a. Maybe a
Prelude.Nothing,
$sel:description:ListedCertificate' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:inactiveDate:ListedCertificate' :: Maybe POSIX
inactiveDate = forall a. Maybe a
Prelude.Nothing,
$sel:status:ListedCertificate' :: Maybe CertificateStatusType
status = forall a. Maybe a
Prelude.Nothing,
$sel:type':ListedCertificate' :: Maybe CertificateType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:usage:ListedCertificate' :: Maybe CertificateUsageType
usage = forall a. Maybe a
Prelude.Nothing
}
listedCertificate_activeDate :: Lens.Lens' ListedCertificate (Prelude.Maybe Prelude.UTCTime)
listedCertificate_activeDate :: Lens' ListedCertificate (Maybe UTCTime)
listedCertificate_activeDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe POSIX
activeDate :: Maybe POSIX
$sel:activeDate:ListedCertificate' :: ListedCertificate -> Maybe POSIX
activeDate} -> Maybe POSIX
activeDate) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe POSIX
a -> ListedCertificate
s {$sel:activeDate:ListedCertificate' :: Maybe POSIX
activeDate = Maybe POSIX
a} :: ListedCertificate) 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
listedCertificate_arn :: Lens.Lens' ListedCertificate (Prelude.Maybe Prelude.Text)
listedCertificate_arn :: Lens' ListedCertificate (Maybe Text)
listedCertificate_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe Text
arn :: Maybe Text
$sel:arn:ListedCertificate' :: ListedCertificate -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe Text
a -> ListedCertificate
s {$sel:arn:ListedCertificate' :: Maybe Text
arn = Maybe Text
a} :: ListedCertificate)
listedCertificate_certificateId :: Lens.Lens' ListedCertificate (Prelude.Maybe Prelude.Text)
listedCertificate_certificateId :: Lens' ListedCertificate (Maybe Text)
listedCertificate_certificateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe Text
certificateId :: Maybe Text
$sel:certificateId:ListedCertificate' :: ListedCertificate -> Maybe Text
certificateId} -> Maybe Text
certificateId) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe Text
a -> ListedCertificate
s {$sel:certificateId:ListedCertificate' :: Maybe Text
certificateId = Maybe Text
a} :: ListedCertificate)
listedCertificate_description :: Lens.Lens' ListedCertificate (Prelude.Maybe Prelude.Text)
listedCertificate_description :: Lens' ListedCertificate (Maybe Text)
listedCertificate_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe Text
description :: Maybe Text
$sel:description:ListedCertificate' :: ListedCertificate -> Maybe Text
description} -> Maybe Text
description) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe Text
a -> ListedCertificate
s {$sel:description:ListedCertificate' :: Maybe Text
description = Maybe Text
a} :: ListedCertificate)
listedCertificate_inactiveDate :: Lens.Lens' ListedCertificate (Prelude.Maybe Prelude.UTCTime)
listedCertificate_inactiveDate :: Lens' ListedCertificate (Maybe UTCTime)
listedCertificate_inactiveDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe POSIX
inactiveDate :: Maybe POSIX
$sel:inactiveDate:ListedCertificate' :: ListedCertificate -> Maybe POSIX
inactiveDate} -> Maybe POSIX
inactiveDate) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe POSIX
a -> ListedCertificate
s {$sel:inactiveDate:ListedCertificate' :: Maybe POSIX
inactiveDate = Maybe POSIX
a} :: ListedCertificate) 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
listedCertificate_status :: Lens.Lens' ListedCertificate (Prelude.Maybe CertificateStatusType)
listedCertificate_status :: Lens' ListedCertificate (Maybe CertificateStatusType)
listedCertificate_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe CertificateStatusType
status :: Maybe CertificateStatusType
$sel:status:ListedCertificate' :: ListedCertificate -> Maybe CertificateStatusType
status} -> Maybe CertificateStatusType
status) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe CertificateStatusType
a -> ListedCertificate
s {$sel:status:ListedCertificate' :: Maybe CertificateStatusType
status = Maybe CertificateStatusType
a} :: ListedCertificate)
listedCertificate_type :: Lens.Lens' ListedCertificate (Prelude.Maybe CertificateType)
listedCertificate_type :: Lens' ListedCertificate (Maybe CertificateType)
listedCertificate_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe CertificateType
type' :: Maybe CertificateType
$sel:type':ListedCertificate' :: ListedCertificate -> Maybe CertificateType
type'} -> Maybe CertificateType
type') (\s :: ListedCertificate
s@ListedCertificate' {} Maybe CertificateType
a -> ListedCertificate
s {$sel:type':ListedCertificate' :: Maybe CertificateType
type' = Maybe CertificateType
a} :: ListedCertificate)
listedCertificate_usage :: Lens.Lens' ListedCertificate (Prelude.Maybe CertificateUsageType)
listedCertificate_usage :: Lens' ListedCertificate (Maybe CertificateUsageType)
listedCertificate_usage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedCertificate' {Maybe CertificateUsageType
usage :: Maybe CertificateUsageType
$sel:usage:ListedCertificate' :: ListedCertificate -> Maybe CertificateUsageType
usage} -> Maybe CertificateUsageType
usage) (\s :: ListedCertificate
s@ListedCertificate' {} Maybe CertificateUsageType
a -> ListedCertificate
s {$sel:usage:ListedCertificate' :: Maybe CertificateUsageType
usage = Maybe CertificateUsageType
a} :: ListedCertificate)
instance Data.FromJSON ListedCertificate where
parseJSON :: Value -> Parser ListedCertificate
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListedCertificate"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe CertificateStatusType
-> Maybe CertificateType
-> Maybe CertificateUsageType
-> ListedCertificate
ListedCertificate'
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
"ActiveDate")
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
"Arn")
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
"CertificateId")
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
"InactiveDate")
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
"Status")
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 (Maybe a)
Data..:? Key
"Usage")
)
instance Prelude.Hashable ListedCertificate where
hashWithSalt :: Int -> ListedCertificate -> Int
hashWithSalt Int
_salt ListedCertificate' {Maybe Text
Maybe POSIX
Maybe CertificateStatusType
Maybe CertificateType
Maybe CertificateUsageType
usage :: Maybe CertificateUsageType
type' :: Maybe CertificateType
status :: Maybe CertificateStatusType
inactiveDate :: Maybe POSIX
description :: Maybe Text
certificateId :: Maybe Text
arn :: Maybe Text
activeDate :: Maybe POSIX
$sel:usage:ListedCertificate' :: ListedCertificate -> Maybe CertificateUsageType
$sel:type':ListedCertificate' :: ListedCertificate -> Maybe CertificateType
$sel:status:ListedCertificate' :: ListedCertificate -> Maybe CertificateStatusType
$sel:inactiveDate:ListedCertificate' :: ListedCertificate -> Maybe POSIX
$sel:description:ListedCertificate' :: ListedCertificate -> Maybe Text
$sel:certificateId:ListedCertificate' :: ListedCertificate -> Maybe Text
$sel:arn:ListedCertificate' :: ListedCertificate -> Maybe Text
$sel:activeDate:ListedCertificate' :: ListedCertificate -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
activeDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
inactiveDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateStatusType
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateUsageType
usage
instance Prelude.NFData ListedCertificate where
rnf :: ListedCertificate -> ()
rnf ListedCertificate' {Maybe Text
Maybe POSIX
Maybe CertificateStatusType
Maybe CertificateType
Maybe CertificateUsageType
usage :: Maybe CertificateUsageType
type' :: Maybe CertificateType
status :: Maybe CertificateStatusType
inactiveDate :: Maybe POSIX
description :: Maybe Text
certificateId :: Maybe Text
arn :: Maybe Text
activeDate :: Maybe POSIX
$sel:usage:ListedCertificate' :: ListedCertificate -> Maybe CertificateUsageType
$sel:type':ListedCertificate' :: ListedCertificate -> Maybe CertificateType
$sel:status:ListedCertificate' :: ListedCertificate -> Maybe CertificateStatusType
$sel:inactiveDate:ListedCertificate' :: ListedCertificate -> Maybe POSIX
$sel:description:ListedCertificate' :: ListedCertificate -> Maybe Text
$sel:certificateId:ListedCertificate' :: ListedCertificate -> Maybe Text
$sel:arn:ListedCertificate' :: ListedCertificate -> Maybe Text
$sel:activeDate:ListedCertificate' :: ListedCertificate -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
activeDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateId
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 POSIX
inactiveDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateStatusType
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateUsageType
usage