module Stratosphere.SSMContacts.Contact (
module Exports, Contact(..), mkContact
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSMContacts.Contact.StageProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Contact
=
Contact {Contact -> ()
haddock_workaround_ :: (),
Contact -> Value Text
alias :: (Value Prelude.Text),
Contact -> Value Text
displayName :: (Value Prelude.Text),
Contact -> Maybe [StageProperty]
plan :: (Prelude.Maybe [StageProperty]),
Contact -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
Contact -> Value Text
type' :: (Value Prelude.Text)}
deriving stock (Contact -> Contact -> Bool
(Contact -> Contact -> Bool)
-> (Contact -> Contact -> Bool) -> Eq Contact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Contact -> Contact -> Bool
== :: Contact -> Contact -> Bool
$c/= :: Contact -> Contact -> Bool
/= :: Contact -> Contact -> Bool
Prelude.Eq, Int -> Contact -> ShowS
[Contact] -> ShowS
Contact -> String
(Int -> Contact -> ShowS)
-> (Contact -> String) -> ([Contact] -> ShowS) -> Show Contact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Contact -> ShowS
showsPrec :: Int -> Contact -> ShowS
$cshow :: Contact -> String
show :: Contact -> String
$cshowList :: [Contact] -> ShowS
showList :: [Contact] -> ShowS
Prelude.Show)
mkContact ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> Contact
mkContact :: Value Text -> Value Text -> Value Text -> Contact
mkContact Value Text
alias Value Text
displayName Value Text
type'
= Contact
{haddock_workaround_ :: ()
haddock_workaround_ = (), alias :: Value Text
alias = Value Text
alias,
displayName :: Value Text
displayName = Value Text
displayName, type' :: Value Text
type' = Value Text
type', plan :: Maybe [StageProperty]
plan = Maybe [StageProperty]
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Contact where
toResourceProperties :: Contact -> ResourceProperties
toResourceProperties Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SSMContacts::Contact",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"Alias" 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
alias, Key
"DisplayName" 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
displayName,
Key
"Type" 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
type']
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [StageProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Plan" ([StageProperty] -> (Key, Value))
-> Maybe [StageProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StageProperty]
plan,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Contact where
toJSON :: Contact -> Value
toJSON Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: 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
"Alias" 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
alias, Key
"DisplayName" 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
displayName,
Key
"Type" 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
type']
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [StageProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Plan" ([StageProperty] -> (Key, Value))
-> Maybe [StageProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StageProperty]
plan,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Alias" Contact where
type PropertyType "Alias" Contact = Value Prelude.Text
set :: PropertyType "Alias" Contact -> Contact -> Contact
set PropertyType "Alias" Contact
newValue Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..} = Contact {alias :: Value Text
alias = PropertyType "Alias" Contact
Value Text
newValue, Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: ()
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
haddock_workaround_ :: ()
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..}
instance Property "DisplayName" Contact where
type PropertyType "DisplayName" Contact = Value Prelude.Text
set :: PropertyType "DisplayName" Contact -> Contact -> Contact
set PropertyType "DisplayName" Contact
newValue Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..} = Contact {displayName :: Value Text
displayName = PropertyType "DisplayName" Contact
Value Text
newValue, Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: ()
alias :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
haddock_workaround_ :: ()
alias :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..}
instance Property "Plan" Contact where
type PropertyType "Plan" Contact = [StageProperty]
set :: PropertyType "Plan" Contact -> Contact -> Contact
set PropertyType "Plan" Contact
newValue Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..}
= Contact {plan :: Maybe [StageProperty]
plan = [StageProperty] -> Maybe [StageProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [StageProperty]
PropertyType "Plan" Contact
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
tags :: Maybe [Tag]
type' :: Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
tags :: Maybe [Tag]
type' :: Value Text
..}
instance Property "Tags" Contact where
type PropertyType "Tags" Contact = [Tag]
set :: PropertyType "Tags" Contact -> Contact -> Contact
set PropertyType "Tags" Contact
newValue Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..}
= Contact {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Contact
newValue, Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
type' :: Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
type' :: Value Text
..}
instance Property "Type" Contact where
type PropertyType "Type" Contact = Value Prelude.Text
set :: PropertyType "Type" Contact -> Contact -> Contact
set PropertyType "Type" Contact
newValue Contact {Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: Contact -> ()
alias :: Contact -> Value Text
displayName :: Contact -> Value Text
plan :: Contact -> Maybe [StageProperty]
tags :: Contact -> Maybe [Tag]
type' :: Contact -> Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
type' :: Value Text
..} = Contact {type' :: Value Text
type' = PropertyType "Type" Contact
Value Text
newValue, Maybe [Tag]
Maybe [StageProperty]
()
Value Text
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
alias :: Value Text
displayName :: Value Text
plan :: Maybe [StageProperty]
tags :: Maybe [Tag]
..}