{-# 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.KMS.Types.XksKeyConfigurationType 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 XksKeyConfigurationType = XksKeyConfigurationType'
{
XksKeyConfigurationType -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (XksKeyConfigurationType -> XksKeyConfigurationType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XksKeyConfigurationType -> XksKeyConfigurationType -> Bool
$c/= :: XksKeyConfigurationType -> XksKeyConfigurationType -> Bool
== :: XksKeyConfigurationType -> XksKeyConfigurationType -> Bool
$c== :: XksKeyConfigurationType -> XksKeyConfigurationType -> Bool
Prelude.Eq, ReadPrec [XksKeyConfigurationType]
ReadPrec XksKeyConfigurationType
Int -> ReadS XksKeyConfigurationType
ReadS [XksKeyConfigurationType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XksKeyConfigurationType]
$creadListPrec :: ReadPrec [XksKeyConfigurationType]
readPrec :: ReadPrec XksKeyConfigurationType
$creadPrec :: ReadPrec XksKeyConfigurationType
readList :: ReadS [XksKeyConfigurationType]
$creadList :: ReadS [XksKeyConfigurationType]
readsPrec :: Int -> ReadS XksKeyConfigurationType
$creadsPrec :: Int -> ReadS XksKeyConfigurationType
Prelude.Read, Int -> XksKeyConfigurationType -> ShowS
[XksKeyConfigurationType] -> ShowS
XksKeyConfigurationType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XksKeyConfigurationType] -> ShowS
$cshowList :: [XksKeyConfigurationType] -> ShowS
show :: XksKeyConfigurationType -> String
$cshow :: XksKeyConfigurationType -> String
showsPrec :: Int -> XksKeyConfigurationType -> ShowS
$cshowsPrec :: Int -> XksKeyConfigurationType -> ShowS
Prelude.Show, forall x. Rep XksKeyConfigurationType x -> XksKeyConfigurationType
forall x. XksKeyConfigurationType -> Rep XksKeyConfigurationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep XksKeyConfigurationType x -> XksKeyConfigurationType
$cfrom :: forall x. XksKeyConfigurationType -> Rep XksKeyConfigurationType x
Prelude.Generic)
newXksKeyConfigurationType ::
XksKeyConfigurationType
newXksKeyConfigurationType :: XksKeyConfigurationType
newXksKeyConfigurationType =
XksKeyConfigurationType' {$sel:id:XksKeyConfigurationType' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing}
xksKeyConfigurationType_id :: Lens.Lens' XksKeyConfigurationType (Prelude.Maybe Prelude.Text)
xksKeyConfigurationType_id :: Lens' XksKeyConfigurationType (Maybe Text)
xksKeyConfigurationType_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XksKeyConfigurationType' {Maybe Text
id :: Maybe Text
$sel:id:XksKeyConfigurationType' :: XksKeyConfigurationType -> Maybe Text
id} -> Maybe Text
id) (\s :: XksKeyConfigurationType
s@XksKeyConfigurationType' {} Maybe Text
a -> XksKeyConfigurationType
s {$sel:id:XksKeyConfigurationType' :: Maybe Text
id = Maybe Text
a} :: XksKeyConfigurationType)
instance Data.FromJSON XksKeyConfigurationType where
parseJSON :: Value -> Parser XksKeyConfigurationType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"XksKeyConfigurationType"
( \Object
x ->
Maybe Text -> XksKeyConfigurationType
XksKeyConfigurationType'
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
"Id")
)
instance Prelude.Hashable XksKeyConfigurationType where
hashWithSalt :: Int -> XksKeyConfigurationType -> Int
hashWithSalt Int
_salt XksKeyConfigurationType' {Maybe Text
id :: Maybe Text
$sel:id:XksKeyConfigurationType' :: XksKeyConfigurationType -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
instance Prelude.NFData XksKeyConfigurationType where
rnf :: XksKeyConfigurationType -> ()
rnf XksKeyConfigurationType' {Maybe Text
id :: Maybe Text
$sel:id:XksKeyConfigurationType' :: XksKeyConfigurationType -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id