module Stratosphere.Logs.Transformer.MoveKeyEntryProperty (
        MoveKeyEntryProperty(..), mkMoveKeyEntryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MoveKeyEntryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-movekeyentry.html>
    MoveKeyEntryProperty {MoveKeyEntryProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-movekeyentry.html#cfn-logs-transformer-movekeyentry-overwriteifexists>
                          MoveKeyEntryProperty -> Maybe (Value Bool)
overwriteIfExists :: (Prelude.Maybe (Value Prelude.Bool)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-movekeyentry.html#cfn-logs-transformer-movekeyentry-source>
                          MoveKeyEntryProperty -> Value Text
source :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-transformer-movekeyentry.html#cfn-logs-transformer-movekeyentry-target>
                          MoveKeyEntryProperty -> Value Text
target :: (Value Prelude.Text)}
  deriving stock (MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool
(MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool)
-> (MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool)
-> Eq MoveKeyEntryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool
== :: MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool
$c/= :: MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool
/= :: MoveKeyEntryProperty -> MoveKeyEntryProperty -> Bool
Prelude.Eq, Int -> MoveKeyEntryProperty -> ShowS
[MoveKeyEntryProperty] -> ShowS
MoveKeyEntryProperty -> String
(Int -> MoveKeyEntryProperty -> ShowS)
-> (MoveKeyEntryProperty -> String)
-> ([MoveKeyEntryProperty] -> ShowS)
-> Show MoveKeyEntryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MoveKeyEntryProperty -> ShowS
showsPrec :: Int -> MoveKeyEntryProperty -> ShowS
$cshow :: MoveKeyEntryProperty -> String
show :: MoveKeyEntryProperty -> String
$cshowList :: [MoveKeyEntryProperty] -> ShowS
showList :: [MoveKeyEntryProperty] -> ShowS
Prelude.Show)
mkMoveKeyEntryProperty ::
  Value Prelude.Text -> Value Prelude.Text -> MoveKeyEntryProperty
mkMoveKeyEntryProperty :: Value Text -> Value Text -> MoveKeyEntryProperty
mkMoveKeyEntryProperty Value Text
source Value Text
target
  = MoveKeyEntryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), source :: Value Text
source = Value Text
source, target :: Value Text
target = Value Text
target,
       overwriteIfExists :: Maybe (Value Bool)
overwriteIfExists = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MoveKeyEntryProperty where
  toResourceProperties :: MoveKeyEntryProperty -> ResourceProperties
toResourceProperties MoveKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: MoveKeyEntryProperty -> ()
overwriteIfExists :: MoveKeyEntryProperty -> Maybe (Value Bool)
source :: MoveKeyEntryProperty -> Value Text
target :: MoveKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Logs::Transformer.MoveKeyEntry",
         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
"Source" 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
source, Key
"Target" 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
target]
                           ([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 MoveKeyEntryProperty where
  toJSON :: MoveKeyEntryProperty -> Value
toJSON MoveKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: MoveKeyEntryProperty -> ()
overwriteIfExists :: MoveKeyEntryProperty -> Maybe (Value Bool)
source :: MoveKeyEntryProperty -> Value Text
target :: MoveKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: 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
"Source" 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
source, Key
"Target" 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
target]
              ([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 "OverwriteIfExists" MoveKeyEntryProperty where
  type PropertyType "OverwriteIfExists" MoveKeyEntryProperty = Value Prelude.Bool
  set :: PropertyType "OverwriteIfExists" MoveKeyEntryProperty
-> MoveKeyEntryProperty -> MoveKeyEntryProperty
set PropertyType "OverwriteIfExists" MoveKeyEntryProperty
newValue MoveKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: MoveKeyEntryProperty -> ()
overwriteIfExists :: MoveKeyEntryProperty -> Maybe (Value Bool)
source :: MoveKeyEntryProperty -> Value Text
target :: MoveKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
    = MoveKeyEntryProperty
        {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" MoveKeyEntryProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
source :: Value Text
target :: Value Text
haddock_workaround_ :: ()
source :: Value Text
target :: Value Text
..}
instance Property "Source" MoveKeyEntryProperty where
  type PropertyType "Source" MoveKeyEntryProperty = Value Prelude.Text
  set :: PropertyType "Source" MoveKeyEntryProperty
-> MoveKeyEntryProperty -> MoveKeyEntryProperty
set PropertyType "Source" MoveKeyEntryProperty
newValue MoveKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: MoveKeyEntryProperty -> ()
overwriteIfExists :: MoveKeyEntryProperty -> Maybe (Value Bool)
source :: MoveKeyEntryProperty -> Value Text
target :: MoveKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
    = MoveKeyEntryProperty {source :: Value Text
source = PropertyType "Source" MoveKeyEntryProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
target :: Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
target :: Value Text
..}
instance Property "Target" MoveKeyEntryProperty where
  type PropertyType "Target" MoveKeyEntryProperty = Value Prelude.Text
  set :: PropertyType "Target" MoveKeyEntryProperty
-> MoveKeyEntryProperty -> MoveKeyEntryProperty
set PropertyType "Target" MoveKeyEntryProperty
newValue MoveKeyEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: MoveKeyEntryProperty -> ()
overwriteIfExists :: MoveKeyEntryProperty -> Maybe (Value Bool)
source :: MoveKeyEntryProperty -> Value Text
target :: MoveKeyEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
    = MoveKeyEntryProperty {target :: Value Text
target = PropertyType "Target" MoveKeyEntryProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
..}