module Stratosphere.Logs.Transformer.AddKeyEntryProperty (
        AddKeyEntryProperty(..), mkAddKeyEntryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AddKeyEntryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-addkeyentry.html>
    AddKeyEntryProperty {AddKeyEntryProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-addkeyentry.html#cfn-logs-transformer-addkeyentry-key>
                         AddKeyEntryProperty -> Value Text
key :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-addkeyentry.html#cfn-logs-transformer-addkeyentry-overwriteifexists>
                         AddKeyEntryProperty -> Maybe (Value Bool)
overwriteIfExists :: (Prelude.Maybe (Value Prelude.Bool)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-addkeyentry.html#cfn-logs-transformer-addkeyentry-value>
                         AddKeyEntryProperty -> Value Text
value :: (Value Prelude.Text)}
  deriving stock (AddKeyEntryProperty -> AddKeyEntryProperty -> Bool
(AddKeyEntryProperty -> AddKeyEntryProperty -> Bool)
-> (AddKeyEntryProperty -> AddKeyEntryProperty -> Bool)
-> Eq AddKeyEntryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddKeyEntryProperty -> AddKeyEntryProperty -> Bool
== :: AddKeyEntryProperty -> AddKeyEntryProperty -> Bool
$c/= :: AddKeyEntryProperty -> AddKeyEntryProperty -> Bool
/= :: AddKeyEntryProperty -> AddKeyEntryProperty -> Bool
Prelude.Eq, Int -> AddKeyEntryProperty -> ShowS
[AddKeyEntryProperty] -> ShowS
AddKeyEntryProperty -> String
(Int -> AddKeyEntryProperty -> ShowS)
-> (AddKeyEntryProperty -> String)
-> ([AddKeyEntryProperty] -> ShowS)
-> Show AddKeyEntryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddKeyEntryProperty -> ShowS
showsPrec :: Int -> AddKeyEntryProperty -> ShowS
$cshow :: AddKeyEntryProperty -> String
show :: AddKeyEntryProperty -> String
$cshowList :: [AddKeyEntryProperty] -> ShowS
showList :: [AddKeyEntryProperty] -> ShowS
Prelude.Show)
mkAddKeyEntryProperty ::
  Value Prelude.Text -> Value Prelude.Text -> AddKeyEntryProperty
mkAddKeyEntryProperty :: Value Text -> Value Text -> AddKeyEntryProperty
mkAddKeyEntryProperty Value Text
key Value Text
value
  = AddKeyEntryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Value Text
key = Value Text
key, value :: Value Text
value = Value Text
value,
       overwriteIfExists :: Maybe (Value Bool)
overwriteIfExists = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AddKeyEntryProperty where
  toResourceProperties :: AddKeyEntryProperty -> ResourceProperties
toResourceProperties AddKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: AddKeyEntryProperty -> ()
key :: AddKeyEntryProperty -> Value Text
overwriteIfExists :: AddKeyEntryProperty -> Maybe (Value Bool)
value :: AddKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
value :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Logs::Transformer.AddKeyEntry",
         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
"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..= Value Text
key, Key
"Value" 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
value]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OverwriteIfExists" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
overwriteIfExists]))}
instance JSON.ToJSON AddKeyEntryProperty where
  toJSON :: AddKeyEntryProperty -> Value
toJSON AddKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: AddKeyEntryProperty -> ()
key :: AddKeyEntryProperty -> Value Text
overwriteIfExists :: AddKeyEntryProperty -> Maybe (Value Bool)
value :: AddKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
value :: 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
"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..= Value Text
key, Key
"Value" 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
value]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OverwriteIfExists" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
overwriteIfExists])))
instance Property "Key" AddKeyEntryProperty where
  type PropertyType "Key" AddKeyEntryProperty = Value Prelude.Text
  set :: PropertyType "Key" AddKeyEntryProperty
-> AddKeyEntryProperty -> AddKeyEntryProperty
set PropertyType "Key" AddKeyEntryProperty
newValue AddKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: AddKeyEntryProperty -> ()
key :: AddKeyEntryProperty -> Value Text
overwriteIfExists :: AddKeyEntryProperty -> Maybe (Value Bool)
value :: AddKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
value :: Value Text
..}
    = AddKeyEntryProperty {key :: Value Text
key = PropertyType "Key" AddKeyEntryProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
value :: Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
value :: Value Text
..}
instance Property "OverwriteIfExists" AddKeyEntryProperty where
  type PropertyType "OverwriteIfExists" AddKeyEntryProperty = Value Prelude.Bool
  set :: PropertyType "OverwriteIfExists" AddKeyEntryProperty
-> AddKeyEntryProperty -> AddKeyEntryProperty
set PropertyType "OverwriteIfExists" AddKeyEntryProperty
newValue AddKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: AddKeyEntryProperty -> ()
key :: AddKeyEntryProperty -> Value Text
overwriteIfExists :: AddKeyEntryProperty -> Maybe (Value Bool)
value :: AddKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
value :: Value Text
..}
    = AddKeyEntryProperty
        {overwriteIfExists :: Maybe (Value Bool)
overwriteIfExists = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OverwriteIfExists" AddKeyEntryProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
key :: Value Text
value :: Value Text
haddock_workaround_ :: ()
key :: Value Text
value :: Value Text
..}
instance Property "Value" AddKeyEntryProperty where
  type PropertyType "Value" AddKeyEntryProperty = Value Prelude.Text
  set :: PropertyType "Value" AddKeyEntryProperty
-> AddKeyEntryProperty -> AddKeyEntryProperty
set PropertyType "Value" AddKeyEntryProperty
newValue AddKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: AddKeyEntryProperty -> ()
key :: AddKeyEntryProperty -> Value Text
overwriteIfExists :: AddKeyEntryProperty -> Maybe (Value Bool)
value :: AddKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
value :: Value Text
..}
    = AddKeyEntryProperty {value :: Value Text
value = PropertyType "Value" AddKeyEntryProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
haddock_workaround_ :: ()
key :: Value Text
overwriteIfExists :: Maybe (Value Bool)
..}