module Stratosphere.FraudDetector.EntityType (
EntityType(..), mkEntityType
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data EntityType
=
EntityType {EntityType -> ()
haddock_workaround_ :: (),
EntityType -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
EntityType -> Value Text
name :: (Value Prelude.Text),
EntityType -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (EntityType -> EntityType -> Bool
(EntityType -> EntityType -> Bool)
-> (EntityType -> EntityType -> Bool) -> Eq EntityType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EntityType -> EntityType -> Bool
== :: EntityType -> EntityType -> Bool
$c/= :: EntityType -> EntityType -> Bool
/= :: EntityType -> EntityType -> Bool
Prelude.Eq, Int -> EntityType -> ShowS
[EntityType] -> ShowS
EntityType -> String
(Int -> EntityType -> ShowS)
-> (EntityType -> String)
-> ([EntityType] -> ShowS)
-> Show EntityType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EntityType -> ShowS
showsPrec :: Int -> EntityType -> ShowS
$cshow :: EntityType -> String
show :: EntityType -> String
$cshowList :: [EntityType] -> ShowS
showList :: [EntityType] -> ShowS
Prelude.Show)
mkEntityType :: Value Prelude.Text -> EntityType
mkEntityType :: Value Text -> EntityType
mkEntityType Value Text
name
= EntityType
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EntityType where
toResourceProperties :: EntityType -> ResourceProperties
toResourceProperties EntityType {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntityType -> ()
description :: EntityType -> Maybe (Value Text)
name :: EntityType -> Value Text
tags :: EntityType -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::FraudDetector::EntityType",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON EntityType where
toJSON :: EntityType -> Value
toJSON EntityType {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntityType -> ()
description :: EntityType -> Maybe (Value Text)
name :: EntityType -> Value Text
tags :: EntityType -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" EntityType where
type PropertyType "Description" EntityType = Value Prelude.Text
set :: PropertyType "Description" EntityType -> EntityType -> EntityType
set PropertyType "Description" EntityType
newValue EntityType {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntityType -> ()
description :: EntityType -> Maybe (Value Text)
name :: EntityType -> Value Text
tags :: EntityType -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= EntityType {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" EntityType
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" EntityType where
type PropertyType "Name" EntityType = Value Prelude.Text
set :: PropertyType "Name" EntityType -> EntityType -> EntityType
set PropertyType "Name" EntityType
newValue EntityType {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntityType -> ()
description :: EntityType -> Maybe (Value Text)
name :: EntityType -> Value Text
tags :: EntityType -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..} = EntityType {name :: Value Text
name = PropertyType "Name" EntityType
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" EntityType where
type PropertyType "Tags" EntityType = [Tag]
set :: PropertyType "Tags" EntityType -> EntityType -> EntityType
set PropertyType "Tags" EntityType
newValue EntityType {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EntityType -> ()
description :: EntityType -> Maybe (Value Text)
name :: EntityType -> Value Text
tags :: EntityType -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= EntityType {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" EntityType
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
..}