module Stratosphere.SSMContacts.Contact.TargetsProperty (
        module Exports, TargetsProperty(..), mkTargetsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMContacts.Contact.ChannelTargetInfoProperty as Exports
import {-# SOURCE #-} Stratosphere.SSMContacts.Contact.ContactTargetInfoProperty as Exports
import Stratosphere.ResourceProperties
data TargetsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-targets.html>
    TargetsProperty {TargetsProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-targets.html#cfn-ssmcontacts-contact-targets-channeltargetinfo>
                     TargetsProperty -> Maybe ChannelTargetInfoProperty
channelTargetInfo :: (Prelude.Maybe ChannelTargetInfoProperty),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-targets.html#cfn-ssmcontacts-contact-targets-contacttargetinfo>
                     TargetsProperty -> Maybe ContactTargetInfoProperty
contactTargetInfo :: (Prelude.Maybe ContactTargetInfoProperty)}
  deriving stock (TargetsProperty -> TargetsProperty -> Bool
(TargetsProperty -> TargetsProperty -> Bool)
-> (TargetsProperty -> TargetsProperty -> Bool)
-> Eq TargetsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetsProperty -> TargetsProperty -> Bool
== :: TargetsProperty -> TargetsProperty -> Bool
$c/= :: TargetsProperty -> TargetsProperty -> Bool
/= :: TargetsProperty -> TargetsProperty -> Bool
Prelude.Eq, Int -> TargetsProperty -> ShowS
[TargetsProperty] -> ShowS
TargetsProperty -> String
(Int -> TargetsProperty -> ShowS)
-> (TargetsProperty -> String)
-> ([TargetsProperty] -> ShowS)
-> Show TargetsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetsProperty -> ShowS
showsPrec :: Int -> TargetsProperty -> ShowS
$cshow :: TargetsProperty -> String
show :: TargetsProperty -> String
$cshowList :: [TargetsProperty] -> ShowS
showList :: [TargetsProperty] -> ShowS
Prelude.Show)
mkTargetsProperty :: TargetsProperty
mkTargetsProperty :: TargetsProperty
mkTargetsProperty
  = TargetsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), channelTargetInfo :: Maybe ChannelTargetInfoProperty
channelTargetInfo = Maybe ChannelTargetInfoProperty
forall a. Maybe a
Prelude.Nothing,
       contactTargetInfo :: Maybe ContactTargetInfoProperty
contactTargetInfo = Maybe ContactTargetInfoProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetsProperty where
  toResourceProperties :: TargetsProperty -> ResourceProperties
toResourceProperties TargetsProperty {Maybe ChannelTargetInfoProperty
Maybe ContactTargetInfoProperty
()
haddock_workaround_ :: TargetsProperty -> ()
channelTargetInfo :: TargetsProperty -> Maybe ChannelTargetInfoProperty
contactTargetInfo :: TargetsProperty -> Maybe ContactTargetInfoProperty
haddock_workaround_ :: ()
channelTargetInfo :: Maybe ChannelTargetInfoProperty
contactTargetInfo :: Maybe ContactTargetInfoProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SSMContacts::Contact.Targets",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> ChannelTargetInfoProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ChannelTargetInfo" (ChannelTargetInfoProperty -> (Key, Value))
-> Maybe ChannelTargetInfoProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChannelTargetInfoProperty
channelTargetInfo,
                            Key -> ContactTargetInfoProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContactTargetInfo" (ContactTargetInfoProperty -> (Key, Value))
-> Maybe ContactTargetInfoProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContactTargetInfoProperty
contactTargetInfo])}
instance JSON.ToJSON TargetsProperty where
  toJSON :: TargetsProperty -> Value
toJSON TargetsProperty {Maybe ChannelTargetInfoProperty
Maybe ContactTargetInfoProperty
()
haddock_workaround_ :: TargetsProperty -> ()
channelTargetInfo :: TargetsProperty -> Maybe ChannelTargetInfoProperty
contactTargetInfo :: TargetsProperty -> Maybe ContactTargetInfoProperty
haddock_workaround_ :: ()
channelTargetInfo :: Maybe ChannelTargetInfoProperty
contactTargetInfo :: Maybe ContactTargetInfoProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> ChannelTargetInfoProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ChannelTargetInfo" (ChannelTargetInfoProperty -> (Key, Value))
-> Maybe ChannelTargetInfoProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChannelTargetInfoProperty
channelTargetInfo,
               Key -> ContactTargetInfoProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContactTargetInfo" (ContactTargetInfoProperty -> (Key, Value))
-> Maybe ContactTargetInfoProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContactTargetInfoProperty
contactTargetInfo]))
instance Property "ChannelTargetInfo" TargetsProperty where
  type PropertyType "ChannelTargetInfo" TargetsProperty = ChannelTargetInfoProperty
  set :: PropertyType "ChannelTargetInfo" TargetsProperty
-> TargetsProperty -> TargetsProperty
set PropertyType "ChannelTargetInfo" TargetsProperty
newValue TargetsProperty {Maybe ChannelTargetInfoProperty
Maybe ContactTargetInfoProperty
()
haddock_workaround_ :: TargetsProperty -> ()
channelTargetInfo :: TargetsProperty -> Maybe ChannelTargetInfoProperty
contactTargetInfo :: TargetsProperty -> Maybe ContactTargetInfoProperty
haddock_workaround_ :: ()
channelTargetInfo :: Maybe ChannelTargetInfoProperty
contactTargetInfo :: Maybe ContactTargetInfoProperty
..}
    = TargetsProperty {channelTargetInfo :: Maybe ChannelTargetInfoProperty
channelTargetInfo = ChannelTargetInfoProperty -> Maybe ChannelTargetInfoProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ChannelTargetInfo" TargetsProperty
ChannelTargetInfoProperty
newValue, Maybe ContactTargetInfoProperty
()
haddock_workaround_ :: ()
contactTargetInfo :: Maybe ContactTargetInfoProperty
haddock_workaround_ :: ()
contactTargetInfo :: Maybe ContactTargetInfoProperty
..}
instance Property "ContactTargetInfo" TargetsProperty where
  type PropertyType "ContactTargetInfo" TargetsProperty = ContactTargetInfoProperty
  set :: PropertyType "ContactTargetInfo" TargetsProperty
-> TargetsProperty -> TargetsProperty
set PropertyType "ContactTargetInfo" TargetsProperty
newValue TargetsProperty {Maybe ChannelTargetInfoProperty
Maybe ContactTargetInfoProperty
()
haddock_workaround_ :: TargetsProperty -> ()
channelTargetInfo :: TargetsProperty -> Maybe ChannelTargetInfoProperty
contactTargetInfo :: TargetsProperty -> Maybe ContactTargetInfoProperty
haddock_workaround_ :: ()
channelTargetInfo :: Maybe ChannelTargetInfoProperty
contactTargetInfo :: Maybe ContactTargetInfoProperty
..}
    = TargetsProperty {contactTargetInfo :: Maybe ContactTargetInfoProperty
contactTargetInfo = ContactTargetInfoProperty -> Maybe ContactTargetInfoProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContactTargetInfo" TargetsProperty
ContactTargetInfoProperty
newValue, Maybe ChannelTargetInfoProperty
()
haddock_workaround_ :: ()
channelTargetInfo :: Maybe ChannelTargetInfoProperty
haddock_workaround_ :: ()
channelTargetInfo :: Maybe ChannelTargetInfoProperty
..}