module Stratosphere.InspectorV2.Filter.MapFilterProperty (
MapFilterProperty(..), mkMapFilterProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MapFilterProperty
=
MapFilterProperty {MapFilterProperty -> ()
haddock_workaround_ :: (),
MapFilterProperty -> Value Text
comparison :: (Value Prelude.Text),
MapFilterProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
MapFilterProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (MapFilterProperty -> MapFilterProperty -> Bool
(MapFilterProperty -> MapFilterProperty -> Bool)
-> (MapFilterProperty -> MapFilterProperty -> Bool)
-> Eq MapFilterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MapFilterProperty -> MapFilterProperty -> Bool
== :: MapFilterProperty -> MapFilterProperty -> Bool
$c/= :: MapFilterProperty -> MapFilterProperty -> Bool
/= :: MapFilterProperty -> MapFilterProperty -> Bool
Prelude.Eq, Int -> MapFilterProperty -> ShowS
[MapFilterProperty] -> ShowS
MapFilterProperty -> String
(Int -> MapFilterProperty -> ShowS)
-> (MapFilterProperty -> String)
-> ([MapFilterProperty] -> ShowS)
-> Show MapFilterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MapFilterProperty -> ShowS
showsPrec :: Int -> MapFilterProperty -> ShowS
$cshow :: MapFilterProperty -> String
show :: MapFilterProperty -> String
$cshowList :: [MapFilterProperty] -> ShowS
showList :: [MapFilterProperty] -> ShowS
Prelude.Show)
mkMapFilterProperty :: Value Prelude.Text -> MapFilterProperty
mkMapFilterProperty :: Value Text -> MapFilterProperty
mkMapFilterProperty Value Text
comparison
= MapFilterProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), comparison :: Value Text
comparison = Value Text
comparison,
key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MapFilterProperty where
toResourceProperties :: MapFilterProperty -> ResourceProperties
toResourceProperties MapFilterProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MapFilterProperty -> ()
comparison :: MapFilterProperty -> Value Text
key :: MapFilterProperty -> Maybe (Value Text)
value :: MapFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::InspectorV2::Filter.MapFilter",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Comparison" 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
comparison]
([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
"Key" (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)
key,
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
"Value" (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)
value]))}
instance JSON.ToJSON MapFilterProperty where
toJSON :: MapFilterProperty -> Value
toJSON MapFilterProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MapFilterProperty -> ()
comparison :: MapFilterProperty -> Value Text
key :: MapFilterProperty -> Maybe (Value Text)
value :: MapFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= [(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
"Comparison" 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
comparison]
([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
"Key" (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)
key,
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
"Value" (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)
value])))
instance Property "Comparison" MapFilterProperty where
type PropertyType "Comparison" MapFilterProperty = Value Prelude.Text
set :: PropertyType "Comparison" MapFilterProperty
-> MapFilterProperty -> MapFilterProperty
set PropertyType "Comparison" MapFilterProperty
newValue MapFilterProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MapFilterProperty -> ()
comparison :: MapFilterProperty -> Value Text
key :: MapFilterProperty -> Maybe (Value Text)
value :: MapFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= MapFilterProperty {comparison :: Value Text
comparison = PropertyType "Comparison" MapFilterProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
instance Property "Key" MapFilterProperty where
type PropertyType "Key" MapFilterProperty = Value Prelude.Text
set :: PropertyType "Key" MapFilterProperty
-> MapFilterProperty -> MapFilterProperty
set PropertyType "Key" MapFilterProperty
newValue MapFilterProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MapFilterProperty -> ()
comparison :: MapFilterProperty -> Value Text
key :: MapFilterProperty -> Maybe (Value Text)
value :: MapFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= MapFilterProperty {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" MapFilterProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
comparison :: Value Text
value :: Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
value :: Maybe (Value Text)
..}
instance Property "Value" MapFilterProperty where
type PropertyType "Value" MapFilterProperty = Value Prelude.Text
set :: PropertyType "Value" MapFilterProperty
-> MapFilterProperty -> MapFilterProperty
set PropertyType "Value" MapFilterProperty
newValue MapFilterProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MapFilterProperty -> ()
comparison :: MapFilterProperty -> Value Text
key :: MapFilterProperty -> Maybe (Value Text)
value :: MapFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= MapFilterProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" MapFilterProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
haddock_workaround_ :: ()
comparison :: Value Text
key :: Maybe (Value Text)
..}