{-# 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.Redshift.Types.HsmStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data HsmStatus = HsmStatus'
{
HsmStatus -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
HsmStatus -> Maybe Text
hsmConfigurationIdentifier :: Prelude.Maybe Prelude.Text,
HsmStatus -> Maybe Text
hsmClientCertificateIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (HsmStatus -> HsmStatus -> Bool
(HsmStatus -> HsmStatus -> Bool)
-> (HsmStatus -> HsmStatus -> Bool) -> Eq HsmStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HsmStatus -> HsmStatus -> Bool
$c/= :: HsmStatus -> HsmStatus -> Bool
== :: HsmStatus -> HsmStatus -> Bool
$c== :: HsmStatus -> HsmStatus -> Bool
Prelude.Eq, ReadPrec [HsmStatus]
ReadPrec HsmStatus
Int -> ReadS HsmStatus
ReadS [HsmStatus]
(Int -> ReadS HsmStatus)
-> ReadS [HsmStatus]
-> ReadPrec HsmStatus
-> ReadPrec [HsmStatus]
-> Read HsmStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HsmStatus]
$creadListPrec :: ReadPrec [HsmStatus]
readPrec :: ReadPrec HsmStatus
$creadPrec :: ReadPrec HsmStatus
readList :: ReadS [HsmStatus]
$creadList :: ReadS [HsmStatus]
readsPrec :: Int -> ReadS HsmStatus
$creadsPrec :: Int -> ReadS HsmStatus
Prelude.Read, Int -> HsmStatus -> ShowS
[HsmStatus] -> ShowS
HsmStatus -> String
(Int -> HsmStatus -> ShowS)
-> (HsmStatus -> String)
-> ([HsmStatus] -> ShowS)
-> Show HsmStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HsmStatus] -> ShowS
$cshowList :: [HsmStatus] -> ShowS
show :: HsmStatus -> String
$cshow :: HsmStatus -> String
showsPrec :: Int -> HsmStatus -> ShowS
$cshowsPrec :: Int -> HsmStatus -> ShowS
Prelude.Show, (forall x. HsmStatus -> Rep HsmStatus x)
-> (forall x. Rep HsmStatus x -> HsmStatus) -> Generic HsmStatus
forall x. Rep HsmStatus x -> HsmStatus
forall x. HsmStatus -> Rep HsmStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HsmStatus x -> HsmStatus
$cfrom :: forall x. HsmStatus -> Rep HsmStatus x
Prelude.Generic)
newHsmStatus ::
HsmStatus
newHsmStatus :: HsmStatus
newHsmStatus =
HsmStatus' :: Maybe Text -> Maybe Text -> Maybe Text -> HsmStatus
HsmStatus'
{ $sel:status:HsmStatus' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmConfigurationIdentifier:HsmStatus' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hsmClientCertificateIdentifier:HsmStatus' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
hsmStatus_status :: Lens.Lens' HsmStatus (Prelude.Maybe Prelude.Text)
hsmStatus_status :: (Maybe Text -> f (Maybe Text)) -> HsmStatus -> f HsmStatus
hsmStatus_status = (HsmStatus -> Maybe Text)
-> (HsmStatus -> Maybe Text -> HsmStatus)
-> Lens HsmStatus HsmStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HsmStatus' {Maybe Text
status :: Maybe Text
$sel:status:HsmStatus' :: HsmStatus -> Maybe Text
status} -> Maybe Text
status) (\s :: HsmStatus
s@HsmStatus' {} Maybe Text
a -> HsmStatus
s {$sel:status:HsmStatus' :: Maybe Text
status = Maybe Text
a} :: HsmStatus)
hsmStatus_hsmConfigurationIdentifier :: Lens.Lens' HsmStatus (Prelude.Maybe Prelude.Text)
hsmStatus_hsmConfigurationIdentifier :: (Maybe Text -> f (Maybe Text)) -> HsmStatus -> f HsmStatus
hsmStatus_hsmConfigurationIdentifier = (HsmStatus -> Maybe Text)
-> (HsmStatus -> Maybe Text -> HsmStatus)
-> Lens HsmStatus HsmStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HsmStatus' {Maybe Text
hsmConfigurationIdentifier :: Maybe Text
$sel:hsmConfigurationIdentifier:HsmStatus' :: HsmStatus -> Maybe Text
hsmConfigurationIdentifier} -> Maybe Text
hsmConfigurationIdentifier) (\s :: HsmStatus
s@HsmStatus' {} Maybe Text
a -> HsmStatus
s {$sel:hsmConfigurationIdentifier:HsmStatus' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
a} :: HsmStatus)
hsmStatus_hsmClientCertificateIdentifier :: Lens.Lens' HsmStatus (Prelude.Maybe Prelude.Text)
hsmStatus_hsmClientCertificateIdentifier :: (Maybe Text -> f (Maybe Text)) -> HsmStatus -> f HsmStatus
hsmStatus_hsmClientCertificateIdentifier = (HsmStatus -> Maybe Text)
-> (HsmStatus -> Maybe Text -> HsmStatus)
-> Lens HsmStatus HsmStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HsmStatus' {Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
$sel:hsmClientCertificateIdentifier:HsmStatus' :: HsmStatus -> Maybe Text
hsmClientCertificateIdentifier} -> Maybe Text
hsmClientCertificateIdentifier) (\s :: HsmStatus
s@HsmStatus' {} Maybe Text
a -> HsmStatus
s {$sel:hsmClientCertificateIdentifier:HsmStatus' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
a} :: HsmStatus)
instance Core.FromXML HsmStatus where
parseXML :: [Node] -> Either String HsmStatus
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> HsmStatus
HsmStatus'
(Maybe Text -> Maybe Text -> Maybe Text -> HsmStatus)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> HsmStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either String (Maybe Text -> Maybe Text -> HsmStatus)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> HsmStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HsmConfigurationIdentifier")
Either String (Maybe Text -> HsmStatus)
-> Either String (Maybe Text) -> Either String HsmStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HsmClientCertificateIdentifier")
instance Prelude.Hashable HsmStatus
instance Prelude.NFData HsmStatus