module Stratosphere.CustomerProfiles.Domain.ConflictResolutionProperty (
        ConflictResolutionProperty(..), mkConflictResolutionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConflictResolutionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-domain-conflictresolution.html>
    ConflictResolutionProperty {ConflictResolutionProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-domain-conflictresolution.html#cfn-customerprofiles-domain-conflictresolution-conflictresolvingmodel>
                                ConflictResolutionProperty -> Value Text
conflictResolvingModel :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-domain-conflictresolution.html#cfn-customerprofiles-domain-conflictresolution-sourcename>
                                ConflictResolutionProperty -> Maybe (Value Text)
sourceName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConflictResolutionProperty -> ConflictResolutionProperty -> Bool
(ConflictResolutionProperty -> ConflictResolutionProperty -> Bool)
-> (ConflictResolutionProperty
    -> ConflictResolutionProperty -> Bool)
-> Eq ConflictResolutionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConflictResolutionProperty -> ConflictResolutionProperty -> Bool
== :: ConflictResolutionProperty -> ConflictResolutionProperty -> Bool
$c/= :: ConflictResolutionProperty -> ConflictResolutionProperty -> Bool
/= :: ConflictResolutionProperty -> ConflictResolutionProperty -> Bool
Prelude.Eq, Int -> ConflictResolutionProperty -> ShowS
[ConflictResolutionProperty] -> ShowS
ConflictResolutionProperty -> String
(Int -> ConflictResolutionProperty -> ShowS)
-> (ConflictResolutionProperty -> String)
-> ([ConflictResolutionProperty] -> ShowS)
-> Show ConflictResolutionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConflictResolutionProperty -> ShowS
showsPrec :: Int -> ConflictResolutionProperty -> ShowS
$cshow :: ConflictResolutionProperty -> String
show :: ConflictResolutionProperty -> String
$cshowList :: [ConflictResolutionProperty] -> ShowS
showList :: [ConflictResolutionProperty] -> ShowS
Prelude.Show)
mkConflictResolutionProperty ::
  Value Prelude.Text -> ConflictResolutionProperty
mkConflictResolutionProperty :: Value Text -> ConflictResolutionProperty
mkConflictResolutionProperty Value Text
conflictResolvingModel
  = ConflictResolutionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       conflictResolvingModel :: Value Text
conflictResolvingModel = Value Text
conflictResolvingModel,
       sourceName :: Maybe (Value Text)
sourceName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConflictResolutionProperty where
  toResourceProperties :: ConflictResolutionProperty -> ResourceProperties
toResourceProperties ConflictResolutionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConflictResolutionProperty -> ()
conflictResolvingModel :: ConflictResolutionProperty -> Value Text
sourceName :: ConflictResolutionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conflictResolvingModel :: Value Text
sourceName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CustomerProfiles::Domain.ConflictResolution",
         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
"ConflictResolvingModel" 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
conflictResolvingModel]
                           ([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
"SourceName" (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)
sourceName]))}
instance JSON.ToJSON ConflictResolutionProperty where
  toJSON :: ConflictResolutionProperty -> Value
toJSON ConflictResolutionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConflictResolutionProperty -> ()
conflictResolvingModel :: ConflictResolutionProperty -> Value Text
sourceName :: ConflictResolutionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conflictResolvingModel :: Value Text
sourceName :: 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
"ConflictResolvingModel" 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
conflictResolvingModel]
              ([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
"SourceName" (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)
sourceName])))
instance Property "ConflictResolvingModel" ConflictResolutionProperty where
  type PropertyType "ConflictResolvingModel" ConflictResolutionProperty = Value Prelude.Text
  set :: PropertyType "ConflictResolvingModel" ConflictResolutionProperty
-> ConflictResolutionProperty -> ConflictResolutionProperty
set PropertyType "ConflictResolvingModel" ConflictResolutionProperty
newValue ConflictResolutionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConflictResolutionProperty -> ()
conflictResolvingModel :: ConflictResolutionProperty -> Value Text
sourceName :: ConflictResolutionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conflictResolvingModel :: Value Text
sourceName :: Maybe (Value Text)
..}
    = ConflictResolutionProperty
        {conflictResolvingModel :: Value Text
conflictResolvingModel = PropertyType "ConflictResolvingModel" ConflictResolutionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sourceName :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceName :: Maybe (Value Text)
..}
instance Property "SourceName" ConflictResolutionProperty where
  type PropertyType "SourceName" ConflictResolutionProperty = Value Prelude.Text
  set :: PropertyType "SourceName" ConflictResolutionProperty
-> ConflictResolutionProperty -> ConflictResolutionProperty
set PropertyType "SourceName" ConflictResolutionProperty
newValue ConflictResolutionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConflictResolutionProperty -> ()
conflictResolvingModel :: ConflictResolutionProperty -> Value Text
sourceName :: ConflictResolutionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conflictResolvingModel :: Value Text
sourceName :: Maybe (Value Text)
..}
    = ConflictResolutionProperty
        {sourceName :: Maybe (Value Text)
sourceName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceName" ConflictResolutionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
conflictResolvingModel :: Value Text
haddock_workaround_ :: ()
conflictResolvingModel :: Value Text
..}