{-# 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.SecurityHub.Types.AwsXrayEncryptionConfigDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsXrayEncryptionConfigDetails = AwsXrayEncryptionConfigDetails'
{
AwsXrayEncryptionConfigDetails -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
AwsXrayEncryptionConfigDetails -> Maybe Text
keyId :: Prelude.Maybe Prelude.Text,
AwsXrayEncryptionConfigDetails -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool
(AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool)
-> (AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool)
-> Eq AwsXrayEncryptionConfigDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool
$c/= :: AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool
== :: AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool
$c== :: AwsXrayEncryptionConfigDetails
-> AwsXrayEncryptionConfigDetails -> Bool
Prelude.Eq, ReadPrec [AwsXrayEncryptionConfigDetails]
ReadPrec AwsXrayEncryptionConfigDetails
Int -> ReadS AwsXrayEncryptionConfigDetails
ReadS [AwsXrayEncryptionConfigDetails]
(Int -> ReadS AwsXrayEncryptionConfigDetails)
-> ReadS [AwsXrayEncryptionConfigDetails]
-> ReadPrec AwsXrayEncryptionConfigDetails
-> ReadPrec [AwsXrayEncryptionConfigDetails]
-> Read AwsXrayEncryptionConfigDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsXrayEncryptionConfigDetails]
$creadListPrec :: ReadPrec [AwsXrayEncryptionConfigDetails]
readPrec :: ReadPrec AwsXrayEncryptionConfigDetails
$creadPrec :: ReadPrec AwsXrayEncryptionConfigDetails
readList :: ReadS [AwsXrayEncryptionConfigDetails]
$creadList :: ReadS [AwsXrayEncryptionConfigDetails]
readsPrec :: Int -> ReadS AwsXrayEncryptionConfigDetails
$creadsPrec :: Int -> ReadS AwsXrayEncryptionConfigDetails
Prelude.Read, Int -> AwsXrayEncryptionConfigDetails -> ShowS
[AwsXrayEncryptionConfigDetails] -> ShowS
AwsXrayEncryptionConfigDetails -> String
(Int -> AwsXrayEncryptionConfigDetails -> ShowS)
-> (AwsXrayEncryptionConfigDetails -> String)
-> ([AwsXrayEncryptionConfigDetails] -> ShowS)
-> Show AwsXrayEncryptionConfigDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsXrayEncryptionConfigDetails] -> ShowS
$cshowList :: [AwsXrayEncryptionConfigDetails] -> ShowS
show :: AwsXrayEncryptionConfigDetails -> String
$cshow :: AwsXrayEncryptionConfigDetails -> String
showsPrec :: Int -> AwsXrayEncryptionConfigDetails -> ShowS
$cshowsPrec :: Int -> AwsXrayEncryptionConfigDetails -> ShowS
Prelude.Show, (forall x.
AwsXrayEncryptionConfigDetails
-> Rep AwsXrayEncryptionConfigDetails x)
-> (forall x.
Rep AwsXrayEncryptionConfigDetails x
-> AwsXrayEncryptionConfigDetails)
-> Generic AwsXrayEncryptionConfigDetails
forall x.
Rep AwsXrayEncryptionConfigDetails x
-> AwsXrayEncryptionConfigDetails
forall x.
AwsXrayEncryptionConfigDetails
-> Rep AwsXrayEncryptionConfigDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsXrayEncryptionConfigDetails x
-> AwsXrayEncryptionConfigDetails
$cfrom :: forall x.
AwsXrayEncryptionConfigDetails
-> Rep AwsXrayEncryptionConfigDetails x
Prelude.Generic)
newAwsXrayEncryptionConfigDetails ::
AwsXrayEncryptionConfigDetails
newAwsXrayEncryptionConfigDetails :: AwsXrayEncryptionConfigDetails
newAwsXrayEncryptionConfigDetails =
AwsXrayEncryptionConfigDetails' :: Maybe Text
-> Maybe Text -> Maybe Text -> AwsXrayEncryptionConfigDetails
AwsXrayEncryptionConfigDetails'
{ $sel:status:AwsXrayEncryptionConfigDetails' :: Maybe Text
status =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:keyId:AwsXrayEncryptionConfigDetails' :: Maybe Text
keyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':AwsXrayEncryptionConfigDetails' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsXrayEncryptionConfigDetails_status :: Lens.Lens' AwsXrayEncryptionConfigDetails (Prelude.Maybe Prelude.Text)
awsXrayEncryptionConfigDetails_status :: (Maybe Text -> f (Maybe Text))
-> AwsXrayEncryptionConfigDetails
-> f AwsXrayEncryptionConfigDetails
awsXrayEncryptionConfigDetails_status = (AwsXrayEncryptionConfigDetails -> Maybe Text)
-> (AwsXrayEncryptionConfigDetails
-> Maybe Text -> AwsXrayEncryptionConfigDetails)
-> Lens
AwsXrayEncryptionConfigDetails
AwsXrayEncryptionConfigDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsXrayEncryptionConfigDetails' {Maybe Text
status :: Maybe Text
$sel:status:AwsXrayEncryptionConfigDetails' :: AwsXrayEncryptionConfigDetails -> Maybe Text
status} -> Maybe Text
status) (\s :: AwsXrayEncryptionConfigDetails
s@AwsXrayEncryptionConfigDetails' {} Maybe Text
a -> AwsXrayEncryptionConfigDetails
s {$sel:status:AwsXrayEncryptionConfigDetails' :: Maybe Text
status = Maybe Text
a} :: AwsXrayEncryptionConfigDetails)
awsXrayEncryptionConfigDetails_keyId :: Lens.Lens' AwsXrayEncryptionConfigDetails (Prelude.Maybe Prelude.Text)
awsXrayEncryptionConfigDetails_keyId :: (Maybe Text -> f (Maybe Text))
-> AwsXrayEncryptionConfigDetails
-> f AwsXrayEncryptionConfigDetails
awsXrayEncryptionConfigDetails_keyId = (AwsXrayEncryptionConfigDetails -> Maybe Text)
-> (AwsXrayEncryptionConfigDetails
-> Maybe Text -> AwsXrayEncryptionConfigDetails)
-> Lens
AwsXrayEncryptionConfigDetails
AwsXrayEncryptionConfigDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsXrayEncryptionConfigDetails' {Maybe Text
keyId :: Maybe Text
$sel:keyId:AwsXrayEncryptionConfigDetails' :: AwsXrayEncryptionConfigDetails -> Maybe Text
keyId} -> Maybe Text
keyId) (\s :: AwsXrayEncryptionConfigDetails
s@AwsXrayEncryptionConfigDetails' {} Maybe Text
a -> AwsXrayEncryptionConfigDetails
s {$sel:keyId:AwsXrayEncryptionConfigDetails' :: Maybe Text
keyId = Maybe Text
a} :: AwsXrayEncryptionConfigDetails)
awsXrayEncryptionConfigDetails_type :: Lens.Lens' AwsXrayEncryptionConfigDetails (Prelude.Maybe Prelude.Text)
awsXrayEncryptionConfigDetails_type :: (Maybe Text -> f (Maybe Text))
-> AwsXrayEncryptionConfigDetails
-> f AwsXrayEncryptionConfigDetails
awsXrayEncryptionConfigDetails_type = (AwsXrayEncryptionConfigDetails -> Maybe Text)
-> (AwsXrayEncryptionConfigDetails
-> Maybe Text -> AwsXrayEncryptionConfigDetails)
-> Lens
AwsXrayEncryptionConfigDetails
AwsXrayEncryptionConfigDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsXrayEncryptionConfigDetails' {Maybe Text
type' :: Maybe Text
$sel:type':AwsXrayEncryptionConfigDetails' :: AwsXrayEncryptionConfigDetails -> Maybe Text
type'} -> Maybe Text
type') (\s :: AwsXrayEncryptionConfigDetails
s@AwsXrayEncryptionConfigDetails' {} Maybe Text
a -> AwsXrayEncryptionConfigDetails
s {$sel:type':AwsXrayEncryptionConfigDetails' :: Maybe Text
type' = Maybe Text
a} :: AwsXrayEncryptionConfigDetails)
instance Core.FromJSON AwsXrayEncryptionConfigDetails where
parseJSON :: Value -> Parser AwsXrayEncryptionConfigDetails
parseJSON =
String
-> (Object -> Parser AwsXrayEncryptionConfigDetails)
-> Value
-> Parser AwsXrayEncryptionConfigDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsXrayEncryptionConfigDetails"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> AwsXrayEncryptionConfigDetails
AwsXrayEncryptionConfigDetails'
(Maybe Text
-> Maybe Text -> Maybe Text -> AwsXrayEncryptionConfigDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> AwsXrayEncryptionConfigDetails)
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
"Status")
Parser (Maybe Text -> Maybe Text -> AwsXrayEncryptionConfigDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsXrayEncryptionConfigDetails)
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
"KeyId")
Parser (Maybe Text -> AwsXrayEncryptionConfigDetails)
-> Parser (Maybe Text) -> Parser AwsXrayEncryptionConfigDetails
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
"Type")
)
instance
Prelude.Hashable
AwsXrayEncryptionConfigDetails
instance
Prelude.NFData
AwsXrayEncryptionConfigDetails
instance Core.ToJSON AwsXrayEncryptionConfigDetails where
toJSON :: AwsXrayEncryptionConfigDetails -> Value
toJSON AwsXrayEncryptionConfigDetails' {Maybe Text
type' :: Maybe Text
keyId :: Maybe Text
status :: Maybe Text
$sel:type':AwsXrayEncryptionConfigDetails' :: AwsXrayEncryptionConfigDetails -> Maybe Text
$sel:keyId:AwsXrayEncryptionConfigDetails' :: AwsXrayEncryptionConfigDetails -> Maybe Text
$sel:status:AwsXrayEncryptionConfigDetails' :: AwsXrayEncryptionConfigDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Status" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
status,
(Text
"KeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyId,
(Text
"Type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
type'
]
)