{-# 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.AwsApiCallActionDomainDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsApiCallActionDomainDetails = AwsApiCallActionDomainDetails'
{
AwsApiCallActionDomainDetails -> Maybe Text
domain :: Prelude.Maybe Prelude.Text
}
deriving (AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool
(AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool)
-> (AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool)
-> Eq AwsApiCallActionDomainDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool
$c/= :: AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool
== :: AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool
$c== :: AwsApiCallActionDomainDetails
-> AwsApiCallActionDomainDetails -> Bool
Prelude.Eq, ReadPrec [AwsApiCallActionDomainDetails]
ReadPrec AwsApiCallActionDomainDetails
Int -> ReadS AwsApiCallActionDomainDetails
ReadS [AwsApiCallActionDomainDetails]
(Int -> ReadS AwsApiCallActionDomainDetails)
-> ReadS [AwsApiCallActionDomainDetails]
-> ReadPrec AwsApiCallActionDomainDetails
-> ReadPrec [AwsApiCallActionDomainDetails]
-> Read AwsApiCallActionDomainDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsApiCallActionDomainDetails]
$creadListPrec :: ReadPrec [AwsApiCallActionDomainDetails]
readPrec :: ReadPrec AwsApiCallActionDomainDetails
$creadPrec :: ReadPrec AwsApiCallActionDomainDetails
readList :: ReadS [AwsApiCallActionDomainDetails]
$creadList :: ReadS [AwsApiCallActionDomainDetails]
readsPrec :: Int -> ReadS AwsApiCallActionDomainDetails
$creadsPrec :: Int -> ReadS AwsApiCallActionDomainDetails
Prelude.Read, Int -> AwsApiCallActionDomainDetails -> ShowS
[AwsApiCallActionDomainDetails] -> ShowS
AwsApiCallActionDomainDetails -> String
(Int -> AwsApiCallActionDomainDetails -> ShowS)
-> (AwsApiCallActionDomainDetails -> String)
-> ([AwsApiCallActionDomainDetails] -> ShowS)
-> Show AwsApiCallActionDomainDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsApiCallActionDomainDetails] -> ShowS
$cshowList :: [AwsApiCallActionDomainDetails] -> ShowS
show :: AwsApiCallActionDomainDetails -> String
$cshow :: AwsApiCallActionDomainDetails -> String
showsPrec :: Int -> AwsApiCallActionDomainDetails -> ShowS
$cshowsPrec :: Int -> AwsApiCallActionDomainDetails -> ShowS
Prelude.Show, (forall x.
AwsApiCallActionDomainDetails
-> Rep AwsApiCallActionDomainDetails x)
-> (forall x.
Rep AwsApiCallActionDomainDetails x
-> AwsApiCallActionDomainDetails)
-> Generic AwsApiCallActionDomainDetails
forall x.
Rep AwsApiCallActionDomainDetails x
-> AwsApiCallActionDomainDetails
forall x.
AwsApiCallActionDomainDetails
-> Rep AwsApiCallActionDomainDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsApiCallActionDomainDetails x
-> AwsApiCallActionDomainDetails
$cfrom :: forall x.
AwsApiCallActionDomainDetails
-> Rep AwsApiCallActionDomainDetails x
Prelude.Generic)
newAwsApiCallActionDomainDetails ::
AwsApiCallActionDomainDetails
newAwsApiCallActionDomainDetails :: AwsApiCallActionDomainDetails
newAwsApiCallActionDomainDetails =
AwsApiCallActionDomainDetails' :: Maybe Text -> AwsApiCallActionDomainDetails
AwsApiCallActionDomainDetails'
{ $sel:domain:AwsApiCallActionDomainDetails' :: Maybe Text
domain =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsApiCallActionDomainDetails_domain :: Lens.Lens' AwsApiCallActionDomainDetails (Prelude.Maybe Prelude.Text)
awsApiCallActionDomainDetails_domain :: (Maybe Text -> f (Maybe Text))
-> AwsApiCallActionDomainDetails -> f AwsApiCallActionDomainDetails
awsApiCallActionDomainDetails_domain = (AwsApiCallActionDomainDetails -> Maybe Text)
-> (AwsApiCallActionDomainDetails
-> Maybe Text -> AwsApiCallActionDomainDetails)
-> Lens
AwsApiCallActionDomainDetails
AwsApiCallActionDomainDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallActionDomainDetails' {Maybe Text
domain :: Maybe Text
$sel:domain:AwsApiCallActionDomainDetails' :: AwsApiCallActionDomainDetails -> Maybe Text
domain} -> Maybe Text
domain) (\s :: AwsApiCallActionDomainDetails
s@AwsApiCallActionDomainDetails' {} Maybe Text
a -> AwsApiCallActionDomainDetails
s {$sel:domain:AwsApiCallActionDomainDetails' :: Maybe Text
domain = Maybe Text
a} :: AwsApiCallActionDomainDetails)
instance Core.FromJSON AwsApiCallActionDomainDetails where
parseJSON :: Value -> Parser AwsApiCallActionDomainDetails
parseJSON =
String
-> (Object -> Parser AwsApiCallActionDomainDetails)
-> Value
-> Parser AwsApiCallActionDomainDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsApiCallActionDomainDetails"
( \Object
x ->
Maybe Text -> AwsApiCallActionDomainDetails
AwsApiCallActionDomainDetails'
(Maybe Text -> AwsApiCallActionDomainDetails)
-> Parser (Maybe Text) -> Parser AwsApiCallActionDomainDetails
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
"Domain")
)
instance
Prelude.Hashable
AwsApiCallActionDomainDetails
instance Prelude.NFData AwsApiCallActionDomainDetails
instance Core.ToJSON AwsApiCallActionDomainDetails where
toJSON :: AwsApiCallActionDomainDetails -> Value
toJSON AwsApiCallActionDomainDetails' {Maybe Text
domain :: Maybe Text
$sel:domain:AwsApiCallActionDomainDetails' :: AwsApiCallActionDomainDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"Domain" 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
domain]
)