{-# 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.CloudHSMV2.Types.Certificates where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Certificates = Certificates'
{
Certificates -> Maybe Text
manufacturerHardwareCertificate :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
clusterCsr :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
hsmCertificate :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
clusterCertificate :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
awsHardwareCertificate :: Prelude.Maybe Prelude.Text
}
deriving (Certificates -> Certificates -> Bool
(Certificates -> Certificates -> Bool)
-> (Certificates -> Certificates -> Bool) -> Eq Certificates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Certificates -> Certificates -> Bool
$c/= :: Certificates -> Certificates -> Bool
== :: Certificates -> Certificates -> Bool
$c== :: Certificates -> Certificates -> Bool
Prelude.Eq, ReadPrec [Certificates]
ReadPrec Certificates
Int -> ReadS Certificates
ReadS [Certificates]
(Int -> ReadS Certificates)
-> ReadS [Certificates]
-> ReadPrec Certificates
-> ReadPrec [Certificates]
-> Read Certificates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Certificates]
$creadListPrec :: ReadPrec [Certificates]
readPrec :: ReadPrec Certificates
$creadPrec :: ReadPrec Certificates
readList :: ReadS [Certificates]
$creadList :: ReadS [Certificates]
readsPrec :: Int -> ReadS Certificates
$creadsPrec :: Int -> ReadS Certificates
Prelude.Read, Int -> Certificates -> ShowS
[Certificates] -> ShowS
Certificates -> String
(Int -> Certificates -> ShowS)
-> (Certificates -> String)
-> ([Certificates] -> ShowS)
-> Show Certificates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Certificates] -> ShowS
$cshowList :: [Certificates] -> ShowS
show :: Certificates -> String
$cshow :: Certificates -> String
showsPrec :: Int -> Certificates -> ShowS
$cshowsPrec :: Int -> Certificates -> ShowS
Prelude.Show, (forall x. Certificates -> Rep Certificates x)
-> (forall x. Rep Certificates x -> Certificates)
-> Generic Certificates
forall x. Rep Certificates x -> Certificates
forall x. Certificates -> Rep Certificates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Certificates x -> Certificates
$cfrom :: forall x. Certificates -> Rep Certificates x
Prelude.Generic)
newCertificates ::
Certificates
newCertificates :: Certificates
newCertificates =
Certificates' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Certificates
Certificates'
{ $sel:manufacturerHardwareCertificate:Certificates' :: Maybe Text
manufacturerHardwareCertificate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterCsr:Certificates' :: Maybe Text
clusterCsr = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmCertificate:Certificates' :: Maybe Text
hsmCertificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusterCertificate:Certificates' :: Maybe Text
clusterCertificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:awsHardwareCertificate:Certificates' :: Maybe Text
awsHardwareCertificate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
certificates_manufacturerHardwareCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_manufacturerHardwareCertificate :: (Maybe Text -> f (Maybe Text)) -> Certificates -> f Certificates
certificates_manufacturerHardwareCertificate = (Certificates -> Maybe Text)
-> (Certificates -> Maybe Text -> Certificates)
-> Lens Certificates Certificates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificates' {Maybe Text
manufacturerHardwareCertificate :: Maybe Text
$sel:manufacturerHardwareCertificate:Certificates' :: Certificates -> Maybe Text
manufacturerHardwareCertificate} -> Maybe Text
manufacturerHardwareCertificate) (\s :: Certificates
s@Certificates' {} Maybe Text
a -> Certificates
s {$sel:manufacturerHardwareCertificate:Certificates' :: Maybe Text
manufacturerHardwareCertificate = Maybe Text
a} :: Certificates)
certificates_clusterCsr :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_clusterCsr :: (Maybe Text -> f (Maybe Text)) -> Certificates -> f Certificates
certificates_clusterCsr = (Certificates -> Maybe Text)
-> (Certificates -> Maybe Text -> Certificates)
-> Lens Certificates Certificates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificates' {Maybe Text
clusterCsr :: Maybe Text
$sel:clusterCsr:Certificates' :: Certificates -> Maybe Text
clusterCsr} -> Maybe Text
clusterCsr) (\s :: Certificates
s@Certificates' {} Maybe Text
a -> Certificates
s {$sel:clusterCsr:Certificates' :: Maybe Text
clusterCsr = Maybe Text
a} :: Certificates)
certificates_hsmCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_hsmCertificate :: (Maybe Text -> f (Maybe Text)) -> Certificates -> f Certificates
certificates_hsmCertificate = (Certificates -> Maybe Text)
-> (Certificates -> Maybe Text -> Certificates)
-> Lens Certificates Certificates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificates' {Maybe Text
hsmCertificate :: Maybe Text
$sel:hsmCertificate:Certificates' :: Certificates -> Maybe Text
hsmCertificate} -> Maybe Text
hsmCertificate) (\s :: Certificates
s@Certificates' {} Maybe Text
a -> Certificates
s {$sel:hsmCertificate:Certificates' :: Maybe Text
hsmCertificate = Maybe Text
a} :: Certificates)
certificates_clusterCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_clusterCertificate :: (Maybe Text -> f (Maybe Text)) -> Certificates -> f Certificates
certificates_clusterCertificate = (Certificates -> Maybe Text)
-> (Certificates -> Maybe Text -> Certificates)
-> Lens Certificates Certificates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificates' {Maybe Text
clusterCertificate :: Maybe Text
$sel:clusterCertificate:Certificates' :: Certificates -> Maybe Text
clusterCertificate} -> Maybe Text
clusterCertificate) (\s :: Certificates
s@Certificates' {} Maybe Text
a -> Certificates
s {$sel:clusterCertificate:Certificates' :: Maybe Text
clusterCertificate = Maybe Text
a} :: Certificates)
certificates_awsHardwareCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_awsHardwareCertificate :: (Maybe Text -> f (Maybe Text)) -> Certificates -> f Certificates
certificates_awsHardwareCertificate = (Certificates -> Maybe Text)
-> (Certificates -> Maybe Text -> Certificates)
-> Lens Certificates Certificates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificates' {Maybe Text
awsHardwareCertificate :: Maybe Text
$sel:awsHardwareCertificate:Certificates' :: Certificates -> Maybe Text
awsHardwareCertificate} -> Maybe Text
awsHardwareCertificate) (\s :: Certificates
s@Certificates' {} Maybe Text
a -> Certificates
s {$sel:awsHardwareCertificate:Certificates' :: Maybe Text
awsHardwareCertificate = Maybe Text
a} :: Certificates)
instance Core.FromJSON Certificates where
parseJSON :: Value -> Parser Certificates
parseJSON =
String
-> (Object -> Parser Certificates) -> Value -> Parser Certificates
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Certificates"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Certificates
Certificates'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Certificates)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Certificates)
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
"ManufacturerHardwareCertificate")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Certificates)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Certificates)
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
"ClusterCsr")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Certificates)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Certificates)
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
"HsmCertificate")
Parser (Maybe Text -> Maybe Text -> Certificates)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Certificates)
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
"ClusterCertificate")
Parser (Maybe Text -> Certificates)
-> Parser (Maybe Text) -> Parser Certificates
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
"AwsHardwareCertificate")
)
instance Prelude.Hashable Certificates
instance Prelude.NFData Certificates