module Stratosphere.Logs.Transformer.CopyValueEntryProperty (
CopyValueEntryProperty(..), mkCopyValueEntryProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CopyValueEntryProperty
=
CopyValueEntryProperty {CopyValueEntryProperty -> ()
haddock_workaround_ :: (),
CopyValueEntryProperty -> Maybe (Value Bool)
overwriteIfExists :: (Prelude.Maybe (Value Prelude.Bool)),
CopyValueEntryProperty -> Value Text
source :: (Value Prelude.Text),
CopyValueEntryProperty -> Value Text
target :: (Value Prelude.Text)}
deriving stock (CopyValueEntryProperty -> CopyValueEntryProperty -> Bool
(CopyValueEntryProperty -> CopyValueEntryProperty -> Bool)
-> (CopyValueEntryProperty -> CopyValueEntryProperty -> Bool)
-> Eq CopyValueEntryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CopyValueEntryProperty -> CopyValueEntryProperty -> Bool
== :: CopyValueEntryProperty -> CopyValueEntryProperty -> Bool
$c/= :: CopyValueEntryProperty -> CopyValueEntryProperty -> Bool
/= :: CopyValueEntryProperty -> CopyValueEntryProperty -> Bool
Prelude.Eq, Int -> CopyValueEntryProperty -> ShowS
[CopyValueEntryProperty] -> ShowS
CopyValueEntryProperty -> String
(Int -> CopyValueEntryProperty -> ShowS)
-> (CopyValueEntryProperty -> String)
-> ([CopyValueEntryProperty] -> ShowS)
-> Show CopyValueEntryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CopyValueEntryProperty -> ShowS
showsPrec :: Int -> CopyValueEntryProperty -> ShowS
$cshow :: CopyValueEntryProperty -> String
show :: CopyValueEntryProperty -> String
$cshowList :: [CopyValueEntryProperty] -> ShowS
showList :: [CopyValueEntryProperty] -> ShowS
Prelude.Show)
mkCopyValueEntryProperty ::
Value Prelude.Text -> Value Prelude.Text -> CopyValueEntryProperty
mkCopyValueEntryProperty :: Value Text -> Value Text -> CopyValueEntryProperty
mkCopyValueEntryProperty Value Text
source Value Text
target
= CopyValueEntryProperty
{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 CopyValueEntryProperty where
toResourceProperties :: CopyValueEntryProperty -> ResourceProperties
toResourceProperties CopyValueEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CopyValueEntryProperty -> ()
overwriteIfExists :: CopyValueEntryProperty -> Maybe (Value Bool)
source :: CopyValueEntryProperty -> Value Text
target :: CopyValueEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Logs::Transformer.CopyValueEntry",
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 CopyValueEntryProperty where
toJSON :: CopyValueEntryProperty -> Value
toJSON CopyValueEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CopyValueEntryProperty -> ()
overwriteIfExists :: CopyValueEntryProperty -> Maybe (Value Bool)
source :: CopyValueEntryProperty -> Value Text
target :: CopyValueEntryProperty -> 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" CopyValueEntryProperty where
type PropertyType "OverwriteIfExists" CopyValueEntryProperty = Value Prelude.Bool
set :: PropertyType "OverwriteIfExists" CopyValueEntryProperty
-> CopyValueEntryProperty -> CopyValueEntryProperty
set PropertyType "OverwriteIfExists" CopyValueEntryProperty
newValue CopyValueEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CopyValueEntryProperty -> ()
overwriteIfExists :: CopyValueEntryProperty -> Maybe (Value Bool)
source :: CopyValueEntryProperty -> Value Text
target :: CopyValueEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
= CopyValueEntryProperty
{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" CopyValueEntryProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
source :: Value Text
target :: Value Text
haddock_workaround_ :: ()
source :: Value Text
target :: Value Text
..}
instance Property "Source" CopyValueEntryProperty where
type PropertyType "Source" CopyValueEntryProperty = Value Prelude.Text
set :: PropertyType "Source" CopyValueEntryProperty
-> CopyValueEntryProperty -> CopyValueEntryProperty
set PropertyType "Source" CopyValueEntryProperty
newValue CopyValueEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CopyValueEntryProperty -> ()
overwriteIfExists :: CopyValueEntryProperty -> Maybe (Value Bool)
source :: CopyValueEntryProperty -> Value Text
target :: CopyValueEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
= CopyValueEntryProperty {source :: Value Text
source = PropertyType "Source" CopyValueEntryProperty
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" CopyValueEntryProperty where
type PropertyType "Target" CopyValueEntryProperty = Value Prelude.Text
set :: PropertyType "Target" CopyValueEntryProperty
-> CopyValueEntryProperty -> CopyValueEntryProperty
set PropertyType "Target" CopyValueEntryProperty
newValue CopyValueEntryProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CopyValueEntryProperty -> ()
overwriteIfExists :: CopyValueEntryProperty -> Maybe (Value Bool)
source :: CopyValueEntryProperty -> Value Text
target :: CopyValueEntryProperty -> Value Text
haddock_workaround_ :: ()
overwriteIfExists :: Maybe (Value Bool)
source :: Value Text
target :: Value Text
..}
= CopyValueEntryProperty {target :: Value Text
target = PropertyType "Target" CopyValueEntryProperty
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
..}