{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Certificates = Certificates'
{
Certificates -> Maybe Text
awsHardwareCertificate :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
clusterCertificate :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
clusterCsr :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
hsmCertificate :: Prelude.Maybe Prelude.Text,
Certificates -> Maybe Text
manufacturerHardwareCertificate :: Prelude.Maybe Prelude.Text
}
deriving (Certificates -> Certificates -> Bool
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]
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
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. 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'
{ $sel:awsHardwareCertificate:Certificates' :: Maybe Text
awsHardwareCertificate =
forall a. Maybe a
Prelude.Nothing,
$sel:clusterCertificate:Certificates' :: Maybe Text
clusterCertificate = forall a. Maybe a
Prelude.Nothing,
$sel:clusterCsr:Certificates' :: Maybe Text
clusterCsr = forall a. Maybe a
Prelude.Nothing,
$sel:hsmCertificate:Certificates' :: Maybe Text
hsmCertificate = forall a. Maybe a
Prelude.Nothing,
$sel:manufacturerHardwareCertificate:Certificates' :: Maybe Text
manufacturerHardwareCertificate = forall a. Maybe a
Prelude.Nothing
}
certificates_awsHardwareCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_awsHardwareCertificate :: Lens' Certificates (Maybe Text)
certificates_awsHardwareCertificate = 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)
certificates_clusterCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_clusterCertificate :: Lens' Certificates (Maybe Text)
certificates_clusterCertificate = 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_clusterCsr :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_clusterCsr :: Lens' Certificates (Maybe Text)
certificates_clusterCsr = 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 :: Lens' Certificates (Maybe Text)
certificates_hsmCertificate = 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_manufacturerHardwareCertificate :: Lens.Lens' Certificates (Prelude.Maybe Prelude.Text)
certificates_manufacturerHardwareCertificate :: Lens' Certificates (Maybe Text)
certificates_manufacturerHardwareCertificate = 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)
instance Data.FromJSON Certificates where
parseJSON :: Value -> Parser Certificates
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Certificates"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Certificates
Certificates'
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
"AwsHardwareCertificate")
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
"ClusterCertificate")
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
"ClusterCsr")
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
"HsmCertificate")
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
"ManufacturerHardwareCertificate")
)
instance Prelude.Hashable Certificates where
hashWithSalt :: Int -> Certificates -> Int
hashWithSalt Int
_salt Certificates' {Maybe Text
manufacturerHardwareCertificate :: Maybe Text
hsmCertificate :: Maybe Text
clusterCsr :: Maybe Text
clusterCertificate :: Maybe Text
awsHardwareCertificate :: Maybe Text
$sel:manufacturerHardwareCertificate:Certificates' :: Certificates -> Maybe Text
$sel:hsmCertificate:Certificates' :: Certificates -> Maybe Text
$sel:clusterCsr:Certificates' :: Certificates -> Maybe Text
$sel:clusterCertificate:Certificates' :: Certificates -> Maybe Text
$sel:awsHardwareCertificate:Certificates' :: Certificates -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsHardwareCertificate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterCertificate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterCsr
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hsmCertificate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
manufacturerHardwareCertificate
instance Prelude.NFData Certificates where
rnf :: Certificates -> ()
rnf Certificates' {Maybe Text
manufacturerHardwareCertificate :: Maybe Text
hsmCertificate :: Maybe Text
clusterCsr :: Maybe Text
clusterCertificate :: Maybe Text
awsHardwareCertificate :: Maybe Text
$sel:manufacturerHardwareCertificate:Certificates' :: Certificates -> Maybe Text
$sel:hsmCertificate:Certificates' :: Certificates -> Maybe Text
$sel:clusterCsr:Certificates' :: Certificates -> Maybe Text
$sel:clusterCertificate:Certificates' :: Certificates -> Maybe Text
$sel:awsHardwareCertificate:Certificates' :: Certificates -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsHardwareCertificate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterCertificate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterCsr
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hsmCertificate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
manufacturerHardwareCertificate