{-# 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.IoTWireless.Types.CertificateList where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTWireless.Types.SigningAlg
import qualified Amazonka.Prelude as Prelude
data CertificateList = CertificateList'
{
CertificateList -> SigningAlg
signingAlg :: SigningAlg,
CertificateList -> Text
value :: Prelude.Text
}
deriving (CertificateList -> CertificateList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CertificateList -> CertificateList -> Bool
$c/= :: CertificateList -> CertificateList -> Bool
== :: CertificateList -> CertificateList -> Bool
$c== :: CertificateList -> CertificateList -> Bool
Prelude.Eq, ReadPrec [CertificateList]
ReadPrec CertificateList
Int -> ReadS CertificateList
ReadS [CertificateList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CertificateList]
$creadListPrec :: ReadPrec [CertificateList]
readPrec :: ReadPrec CertificateList
$creadPrec :: ReadPrec CertificateList
readList :: ReadS [CertificateList]
$creadList :: ReadS [CertificateList]
readsPrec :: Int -> ReadS CertificateList
$creadsPrec :: Int -> ReadS CertificateList
Prelude.Read, Int -> CertificateList -> ShowS
[CertificateList] -> ShowS
CertificateList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CertificateList] -> ShowS
$cshowList :: [CertificateList] -> ShowS
show :: CertificateList -> String
$cshow :: CertificateList -> String
showsPrec :: Int -> CertificateList -> ShowS
$cshowsPrec :: Int -> CertificateList -> ShowS
Prelude.Show, forall x. Rep CertificateList x -> CertificateList
forall x. CertificateList -> Rep CertificateList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CertificateList x -> CertificateList
$cfrom :: forall x. CertificateList -> Rep CertificateList x
Prelude.Generic)
newCertificateList ::
SigningAlg ->
Prelude.Text ->
CertificateList
newCertificateList :: SigningAlg -> Text -> CertificateList
newCertificateList SigningAlg
pSigningAlg_ Text
pValue_ =
CertificateList'
{ $sel:signingAlg:CertificateList' :: SigningAlg
signingAlg = SigningAlg
pSigningAlg_,
$sel:value:CertificateList' :: Text
value = Text
pValue_
}
certificateList_signingAlg :: Lens.Lens' CertificateList SigningAlg
certificateList_signingAlg :: Lens' CertificateList SigningAlg
certificateList_signingAlg = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateList' {SigningAlg
signingAlg :: SigningAlg
$sel:signingAlg:CertificateList' :: CertificateList -> SigningAlg
signingAlg} -> SigningAlg
signingAlg) (\s :: CertificateList
s@CertificateList' {} SigningAlg
a -> CertificateList
s {$sel:signingAlg:CertificateList' :: SigningAlg
signingAlg = SigningAlg
a} :: CertificateList)
certificateList_value :: Lens.Lens' CertificateList Prelude.Text
certificateList_value :: Lens' CertificateList Text
certificateList_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateList' {Text
value :: Text
$sel:value:CertificateList' :: CertificateList -> Text
value} -> Text
value) (\s :: CertificateList
s@CertificateList' {} Text
a -> CertificateList
s {$sel:value:CertificateList' :: Text
value = Text
a} :: CertificateList)
instance Data.FromJSON CertificateList where
parseJSON :: Value -> Parser CertificateList
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CertificateList"
( \Object
x ->
SigningAlg -> Text -> CertificateList
CertificateList'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SigningAlg")
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
"Value")
)
instance Prelude.Hashable CertificateList where
hashWithSalt :: Int -> CertificateList -> Int
hashWithSalt Int
_salt CertificateList' {Text
SigningAlg
value :: Text
signingAlg :: SigningAlg
$sel:value:CertificateList' :: CertificateList -> Text
$sel:signingAlg:CertificateList' :: CertificateList -> SigningAlg
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SigningAlg
signingAlg
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
value
instance Prelude.NFData CertificateList where
rnf :: CertificateList -> ()
rnf CertificateList' {Text
SigningAlg
value :: Text
signingAlg :: SigningAlg
$sel:value:CertificateList' :: CertificateList -> Text
$sel:signingAlg:CertificateList' :: CertificateList -> SigningAlg
..} =
forall a. NFData a => a -> ()
Prelude.rnf SigningAlg
signingAlg
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
value