{-# 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.IoT.Types.ServerCertificateSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.ServerCertificateStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ServerCertificateSummary = ServerCertificateSummary'
{
ServerCertificateSummary -> Maybe Text
serverCertificateStatusDetail :: Prelude.Maybe Prelude.Text,
ServerCertificateSummary -> Maybe ServerCertificateStatus
serverCertificateStatus :: Prelude.Maybe ServerCertificateStatus,
ServerCertificateSummary -> Maybe Text
serverCertificateArn :: Prelude.Maybe Prelude.Text
}
deriving (ServerCertificateSummary -> ServerCertificateSummary -> Bool
(ServerCertificateSummary -> ServerCertificateSummary -> Bool)
-> (ServerCertificateSummary -> ServerCertificateSummary -> Bool)
-> Eq ServerCertificateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerCertificateSummary -> ServerCertificateSummary -> Bool
$c/= :: ServerCertificateSummary -> ServerCertificateSummary -> Bool
== :: ServerCertificateSummary -> ServerCertificateSummary -> Bool
$c== :: ServerCertificateSummary -> ServerCertificateSummary -> Bool
Prelude.Eq, ReadPrec [ServerCertificateSummary]
ReadPrec ServerCertificateSummary
Int -> ReadS ServerCertificateSummary
ReadS [ServerCertificateSummary]
(Int -> ReadS ServerCertificateSummary)
-> ReadS [ServerCertificateSummary]
-> ReadPrec ServerCertificateSummary
-> ReadPrec [ServerCertificateSummary]
-> Read ServerCertificateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServerCertificateSummary]
$creadListPrec :: ReadPrec [ServerCertificateSummary]
readPrec :: ReadPrec ServerCertificateSummary
$creadPrec :: ReadPrec ServerCertificateSummary
readList :: ReadS [ServerCertificateSummary]
$creadList :: ReadS [ServerCertificateSummary]
readsPrec :: Int -> ReadS ServerCertificateSummary
$creadsPrec :: Int -> ReadS ServerCertificateSummary
Prelude.Read, Int -> ServerCertificateSummary -> ShowS
[ServerCertificateSummary] -> ShowS
ServerCertificateSummary -> String
(Int -> ServerCertificateSummary -> ShowS)
-> (ServerCertificateSummary -> String)
-> ([ServerCertificateSummary] -> ShowS)
-> Show ServerCertificateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerCertificateSummary] -> ShowS
$cshowList :: [ServerCertificateSummary] -> ShowS
show :: ServerCertificateSummary -> String
$cshow :: ServerCertificateSummary -> String
showsPrec :: Int -> ServerCertificateSummary -> ShowS
$cshowsPrec :: Int -> ServerCertificateSummary -> ShowS
Prelude.Show, (forall x.
ServerCertificateSummary -> Rep ServerCertificateSummary x)
-> (forall x.
Rep ServerCertificateSummary x -> ServerCertificateSummary)
-> Generic ServerCertificateSummary
forall x.
Rep ServerCertificateSummary x -> ServerCertificateSummary
forall x.
ServerCertificateSummary -> Rep ServerCertificateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServerCertificateSummary x -> ServerCertificateSummary
$cfrom :: forall x.
ServerCertificateSummary -> Rep ServerCertificateSummary x
Prelude.Generic)
newServerCertificateSummary ::
ServerCertificateSummary
newServerCertificateSummary :: ServerCertificateSummary
newServerCertificateSummary =
ServerCertificateSummary' :: Maybe Text
-> Maybe ServerCertificateStatus
-> Maybe Text
-> ServerCertificateSummary
ServerCertificateSummary'
{ $sel:serverCertificateStatusDetail:ServerCertificateSummary' :: Maybe Text
serverCertificateStatusDetail =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverCertificateStatus:ServerCertificateSummary' :: Maybe ServerCertificateStatus
serverCertificateStatus = Maybe ServerCertificateStatus
forall a. Maybe a
Prelude.Nothing,
$sel:serverCertificateArn:ServerCertificateSummary' :: Maybe Text
serverCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
serverCertificateSummary_serverCertificateStatusDetail :: Lens.Lens' ServerCertificateSummary (Prelude.Maybe Prelude.Text)
serverCertificateSummary_serverCertificateStatusDetail :: (Maybe Text -> f (Maybe Text))
-> ServerCertificateSummary -> f ServerCertificateSummary
serverCertificateSummary_serverCertificateStatusDetail = (ServerCertificateSummary -> Maybe Text)
-> (ServerCertificateSummary
-> Maybe Text -> ServerCertificateSummary)
-> Lens
ServerCertificateSummary
ServerCertificateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerCertificateSummary' {Maybe Text
serverCertificateStatusDetail :: Maybe Text
$sel:serverCertificateStatusDetail:ServerCertificateSummary' :: ServerCertificateSummary -> Maybe Text
serverCertificateStatusDetail} -> Maybe Text
serverCertificateStatusDetail) (\s :: ServerCertificateSummary
s@ServerCertificateSummary' {} Maybe Text
a -> ServerCertificateSummary
s {$sel:serverCertificateStatusDetail:ServerCertificateSummary' :: Maybe Text
serverCertificateStatusDetail = Maybe Text
a} :: ServerCertificateSummary)
serverCertificateSummary_serverCertificateStatus :: Lens.Lens' ServerCertificateSummary (Prelude.Maybe ServerCertificateStatus)
serverCertificateSummary_serverCertificateStatus :: (Maybe ServerCertificateStatus
-> f (Maybe ServerCertificateStatus))
-> ServerCertificateSummary -> f ServerCertificateSummary
serverCertificateSummary_serverCertificateStatus = (ServerCertificateSummary -> Maybe ServerCertificateStatus)
-> (ServerCertificateSummary
-> Maybe ServerCertificateStatus -> ServerCertificateSummary)
-> Lens
ServerCertificateSummary
ServerCertificateSummary
(Maybe ServerCertificateStatus)
(Maybe ServerCertificateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerCertificateSummary' {Maybe ServerCertificateStatus
serverCertificateStatus :: Maybe ServerCertificateStatus
$sel:serverCertificateStatus:ServerCertificateSummary' :: ServerCertificateSummary -> Maybe ServerCertificateStatus
serverCertificateStatus} -> Maybe ServerCertificateStatus
serverCertificateStatus) (\s :: ServerCertificateSummary
s@ServerCertificateSummary' {} Maybe ServerCertificateStatus
a -> ServerCertificateSummary
s {$sel:serverCertificateStatus:ServerCertificateSummary' :: Maybe ServerCertificateStatus
serverCertificateStatus = Maybe ServerCertificateStatus
a} :: ServerCertificateSummary)
serverCertificateSummary_serverCertificateArn :: Lens.Lens' ServerCertificateSummary (Prelude.Maybe Prelude.Text)
serverCertificateSummary_serverCertificateArn :: (Maybe Text -> f (Maybe Text))
-> ServerCertificateSummary -> f ServerCertificateSummary
serverCertificateSummary_serverCertificateArn = (ServerCertificateSummary -> Maybe Text)
-> (ServerCertificateSummary
-> Maybe Text -> ServerCertificateSummary)
-> Lens
ServerCertificateSummary
ServerCertificateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerCertificateSummary' {Maybe Text
serverCertificateArn :: Maybe Text
$sel:serverCertificateArn:ServerCertificateSummary' :: ServerCertificateSummary -> Maybe Text
serverCertificateArn} -> Maybe Text
serverCertificateArn) (\s :: ServerCertificateSummary
s@ServerCertificateSummary' {} Maybe Text
a -> ServerCertificateSummary
s {$sel:serverCertificateArn:ServerCertificateSummary' :: Maybe Text
serverCertificateArn = Maybe Text
a} :: ServerCertificateSummary)
instance Core.FromJSON ServerCertificateSummary where
parseJSON :: Value -> Parser ServerCertificateSummary
parseJSON =
String
-> (Object -> Parser ServerCertificateSummary)
-> Value
-> Parser ServerCertificateSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServerCertificateSummary"
( \Object
x ->
Maybe Text
-> Maybe ServerCertificateStatus
-> Maybe Text
-> ServerCertificateSummary
ServerCertificateSummary'
(Maybe Text
-> Maybe ServerCertificateStatus
-> Maybe Text
-> ServerCertificateSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe ServerCertificateStatus
-> Maybe Text -> ServerCertificateSummary)
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
"serverCertificateStatusDetail")
Parser
(Maybe ServerCertificateStatus
-> Maybe Text -> ServerCertificateSummary)
-> Parser (Maybe ServerCertificateStatus)
-> Parser (Maybe Text -> ServerCertificateSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServerCertificateStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serverCertificateStatus")
Parser (Maybe Text -> ServerCertificateSummary)
-> Parser (Maybe Text) -> Parser ServerCertificateSummary
forall (f :: * -> *) a b. Applicative f => 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
"serverCertificateArn")
)
instance Prelude.Hashable ServerCertificateSummary
instance Prelude.NFData ServerCertificateSummary