{-# 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.Signer.Types.SigningProfileRevocationRecord where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SigningProfileRevocationRecord = SigningProfileRevocationRecord'
{
SigningProfileRevocationRecord -> Maybe Text
revokedBy :: Prelude.Maybe Prelude.Text,
SigningProfileRevocationRecord -> Maybe POSIX
revocationEffectiveFrom :: Prelude.Maybe Core.POSIX,
SigningProfileRevocationRecord -> Maybe POSIX
revokedAt :: Prelude.Maybe Core.POSIX
}
deriving (SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool
(SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool)
-> (SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool)
-> Eq SigningProfileRevocationRecord
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool
$c/= :: SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool
== :: SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool
$c== :: SigningProfileRevocationRecord
-> SigningProfileRevocationRecord -> Bool
Prelude.Eq, ReadPrec [SigningProfileRevocationRecord]
ReadPrec SigningProfileRevocationRecord
Int -> ReadS SigningProfileRevocationRecord
ReadS [SigningProfileRevocationRecord]
(Int -> ReadS SigningProfileRevocationRecord)
-> ReadS [SigningProfileRevocationRecord]
-> ReadPrec SigningProfileRevocationRecord
-> ReadPrec [SigningProfileRevocationRecord]
-> Read SigningProfileRevocationRecord
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SigningProfileRevocationRecord]
$creadListPrec :: ReadPrec [SigningProfileRevocationRecord]
readPrec :: ReadPrec SigningProfileRevocationRecord
$creadPrec :: ReadPrec SigningProfileRevocationRecord
readList :: ReadS [SigningProfileRevocationRecord]
$creadList :: ReadS [SigningProfileRevocationRecord]
readsPrec :: Int -> ReadS SigningProfileRevocationRecord
$creadsPrec :: Int -> ReadS SigningProfileRevocationRecord
Prelude.Read, Int -> SigningProfileRevocationRecord -> ShowS
[SigningProfileRevocationRecord] -> ShowS
SigningProfileRevocationRecord -> String
(Int -> SigningProfileRevocationRecord -> ShowS)
-> (SigningProfileRevocationRecord -> String)
-> ([SigningProfileRevocationRecord] -> ShowS)
-> Show SigningProfileRevocationRecord
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigningProfileRevocationRecord] -> ShowS
$cshowList :: [SigningProfileRevocationRecord] -> ShowS
show :: SigningProfileRevocationRecord -> String
$cshow :: SigningProfileRevocationRecord -> String
showsPrec :: Int -> SigningProfileRevocationRecord -> ShowS
$cshowsPrec :: Int -> SigningProfileRevocationRecord -> ShowS
Prelude.Show, (forall x.
SigningProfileRevocationRecord
-> Rep SigningProfileRevocationRecord x)
-> (forall x.
Rep SigningProfileRevocationRecord x
-> SigningProfileRevocationRecord)
-> Generic SigningProfileRevocationRecord
forall x.
Rep SigningProfileRevocationRecord x
-> SigningProfileRevocationRecord
forall x.
SigningProfileRevocationRecord
-> Rep SigningProfileRevocationRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SigningProfileRevocationRecord x
-> SigningProfileRevocationRecord
$cfrom :: forall x.
SigningProfileRevocationRecord
-> Rep SigningProfileRevocationRecord x
Prelude.Generic)
newSigningProfileRevocationRecord ::
SigningProfileRevocationRecord
newSigningProfileRevocationRecord :: SigningProfileRevocationRecord
newSigningProfileRevocationRecord =
SigningProfileRevocationRecord' :: Maybe Text
-> Maybe POSIX -> Maybe POSIX -> SigningProfileRevocationRecord
SigningProfileRevocationRecord'
{ $sel:revokedBy:SigningProfileRevocationRecord' :: Maybe Text
revokedBy =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revocationEffectiveFrom:SigningProfileRevocationRecord' :: Maybe POSIX
revocationEffectiveFrom = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:revokedAt:SigningProfileRevocationRecord' :: Maybe POSIX
revokedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
signingProfileRevocationRecord_revokedBy :: Lens.Lens' SigningProfileRevocationRecord (Prelude.Maybe Prelude.Text)
signingProfileRevocationRecord_revokedBy :: (Maybe Text -> f (Maybe Text))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord
signingProfileRevocationRecord_revokedBy = (SigningProfileRevocationRecord -> Maybe Text)
-> (SigningProfileRevocationRecord
-> Maybe Text -> SigningProfileRevocationRecord)
-> Lens
SigningProfileRevocationRecord
SigningProfileRevocationRecord
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfileRevocationRecord' {Maybe Text
revokedBy :: Maybe Text
$sel:revokedBy:SigningProfileRevocationRecord' :: SigningProfileRevocationRecord -> Maybe Text
revokedBy} -> Maybe Text
revokedBy) (\s :: SigningProfileRevocationRecord
s@SigningProfileRevocationRecord' {} Maybe Text
a -> SigningProfileRevocationRecord
s {$sel:revokedBy:SigningProfileRevocationRecord' :: Maybe Text
revokedBy = Maybe Text
a} :: SigningProfileRevocationRecord)
signingProfileRevocationRecord_revocationEffectiveFrom :: Lens.Lens' SigningProfileRevocationRecord (Prelude.Maybe Prelude.UTCTime)
signingProfileRevocationRecord_revocationEffectiveFrom :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord
signingProfileRevocationRecord_revocationEffectiveFrom = (SigningProfileRevocationRecord -> Maybe POSIX)
-> (SigningProfileRevocationRecord
-> Maybe POSIX -> SigningProfileRevocationRecord)
-> Lens
SigningProfileRevocationRecord
SigningProfileRevocationRecord
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfileRevocationRecord' {Maybe POSIX
revocationEffectiveFrom :: Maybe POSIX
$sel:revocationEffectiveFrom:SigningProfileRevocationRecord' :: SigningProfileRevocationRecord -> Maybe POSIX
revocationEffectiveFrom} -> Maybe POSIX
revocationEffectiveFrom) (\s :: SigningProfileRevocationRecord
s@SigningProfileRevocationRecord' {} Maybe POSIX
a -> SigningProfileRevocationRecord
s {$sel:revocationEffectiveFrom:SigningProfileRevocationRecord' :: Maybe POSIX
revocationEffectiveFrom = Maybe POSIX
a} :: SigningProfileRevocationRecord) ((Maybe POSIX -> f (Maybe POSIX))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
signingProfileRevocationRecord_revokedAt :: Lens.Lens' SigningProfileRevocationRecord (Prelude.Maybe Prelude.UTCTime)
signingProfileRevocationRecord_revokedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord
signingProfileRevocationRecord_revokedAt = (SigningProfileRevocationRecord -> Maybe POSIX)
-> (SigningProfileRevocationRecord
-> Maybe POSIX -> SigningProfileRevocationRecord)
-> Lens
SigningProfileRevocationRecord
SigningProfileRevocationRecord
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningProfileRevocationRecord' {Maybe POSIX
revokedAt :: Maybe POSIX
$sel:revokedAt:SigningProfileRevocationRecord' :: SigningProfileRevocationRecord -> Maybe POSIX
revokedAt} -> Maybe POSIX
revokedAt) (\s :: SigningProfileRevocationRecord
s@SigningProfileRevocationRecord' {} Maybe POSIX
a -> SigningProfileRevocationRecord
s {$sel:revokedAt:SigningProfileRevocationRecord' :: Maybe POSIX
revokedAt = Maybe POSIX
a} :: SigningProfileRevocationRecord) ((Maybe POSIX -> f (Maybe POSIX))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SigningProfileRevocationRecord
-> f SigningProfileRevocationRecord
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON SigningProfileRevocationRecord where
parseJSON :: Value -> Parser SigningProfileRevocationRecord
parseJSON =
String
-> (Object -> Parser SigningProfileRevocationRecord)
-> Value
-> Parser SigningProfileRevocationRecord
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SigningProfileRevocationRecord"
( \Object
x ->
Maybe Text
-> Maybe POSIX -> Maybe POSIX -> SigningProfileRevocationRecord
SigningProfileRevocationRecord'
(Maybe Text
-> Maybe POSIX -> Maybe POSIX -> SigningProfileRevocationRecord)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe POSIX -> SigningProfileRevocationRecord)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revokedBy")
Parser
(Maybe POSIX -> Maybe POSIX -> SigningProfileRevocationRecord)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> SigningProfileRevocationRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revocationEffectiveFrom")
Parser (Maybe POSIX -> SigningProfileRevocationRecord)
-> Parser (Maybe POSIX) -> Parser SigningProfileRevocationRecord
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revokedAt")
)
instance
Prelude.Hashable
SigningProfileRevocationRecord
instance
Prelude.NFData
SigningProfileRevocationRecord