module Stratosphere.Shield.ProactiveEngagement.EmergencyContactProperty (
EmergencyContactProperty(..), mkEmergencyContactProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EmergencyContactProperty
=
EmergencyContactProperty {EmergencyContactProperty -> ()
haddock_workaround_ :: (),
EmergencyContactProperty -> Maybe (Value Text)
contactNotes :: (Prelude.Maybe (Value Prelude.Text)),
EmergencyContactProperty -> Value Text
emailAddress :: (Value Prelude.Text),
EmergencyContactProperty -> Maybe (Value Text)
phoneNumber :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EmergencyContactProperty -> EmergencyContactProperty -> Bool
(EmergencyContactProperty -> EmergencyContactProperty -> Bool)
-> (EmergencyContactProperty -> EmergencyContactProperty -> Bool)
-> Eq EmergencyContactProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EmergencyContactProperty -> EmergencyContactProperty -> Bool
== :: EmergencyContactProperty -> EmergencyContactProperty -> Bool
$c/= :: EmergencyContactProperty -> EmergencyContactProperty -> Bool
/= :: EmergencyContactProperty -> EmergencyContactProperty -> Bool
Prelude.Eq, Int -> EmergencyContactProperty -> ShowS
[EmergencyContactProperty] -> ShowS
EmergencyContactProperty -> String
(Int -> EmergencyContactProperty -> ShowS)
-> (EmergencyContactProperty -> String)
-> ([EmergencyContactProperty] -> ShowS)
-> Show EmergencyContactProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EmergencyContactProperty -> ShowS
showsPrec :: Int -> EmergencyContactProperty -> ShowS
$cshow :: EmergencyContactProperty -> String
show :: EmergencyContactProperty -> String
$cshowList :: [EmergencyContactProperty] -> ShowS
showList :: [EmergencyContactProperty] -> ShowS
Prelude.Show)
mkEmergencyContactProperty ::
Value Prelude.Text -> EmergencyContactProperty
mkEmergencyContactProperty :: Value Text -> EmergencyContactProperty
mkEmergencyContactProperty Value Text
emailAddress
= EmergencyContactProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), emailAddress :: Value Text
emailAddress = Value Text
emailAddress,
contactNotes :: Maybe (Value Text)
contactNotes = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, phoneNumber :: Maybe (Value Text)
phoneNumber = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EmergencyContactProperty where
toResourceProperties :: EmergencyContactProperty -> ResourceProperties
toResourceProperties EmergencyContactProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EmergencyContactProperty -> ()
contactNotes :: EmergencyContactProperty -> Maybe (Value Text)
emailAddress :: EmergencyContactProperty -> Value Text
phoneNumber :: EmergencyContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
phoneNumber :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Shield::ProactiveEngagement.EmergencyContact",
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
"EmailAddress" 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
emailAddress]
([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
"ContactNotes" (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)
contactNotes,
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
"PhoneNumber" (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)
phoneNumber]))}
instance JSON.ToJSON EmergencyContactProperty where
toJSON :: EmergencyContactProperty -> Value
toJSON EmergencyContactProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EmergencyContactProperty -> ()
contactNotes :: EmergencyContactProperty -> Maybe (Value Text)
emailAddress :: EmergencyContactProperty -> Value Text
phoneNumber :: EmergencyContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
phoneNumber :: 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
"EmailAddress" 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
emailAddress]
([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
"ContactNotes" (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)
contactNotes,
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
"PhoneNumber" (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)
phoneNumber])))
instance Property "ContactNotes" EmergencyContactProperty where
type PropertyType "ContactNotes" EmergencyContactProperty = Value Prelude.Text
set :: PropertyType "ContactNotes" EmergencyContactProperty
-> EmergencyContactProperty -> EmergencyContactProperty
set PropertyType "ContactNotes" EmergencyContactProperty
newValue EmergencyContactProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EmergencyContactProperty -> ()
contactNotes :: EmergencyContactProperty -> Maybe (Value Text)
emailAddress :: EmergencyContactProperty -> Value Text
phoneNumber :: EmergencyContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
phoneNumber :: Maybe (Value Text)
..}
= EmergencyContactProperty
{contactNotes :: Maybe (Value Text)
contactNotes = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContactNotes" EmergencyContactProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
emailAddress :: Value Text
phoneNumber :: Maybe (Value Text)
haddock_workaround_ :: ()
emailAddress :: Value Text
phoneNumber :: Maybe (Value Text)
..}
instance Property "EmailAddress" EmergencyContactProperty where
type PropertyType "EmailAddress" EmergencyContactProperty = Value Prelude.Text
set :: PropertyType "EmailAddress" EmergencyContactProperty
-> EmergencyContactProperty -> EmergencyContactProperty
set PropertyType "EmailAddress" EmergencyContactProperty
newValue EmergencyContactProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EmergencyContactProperty -> ()
contactNotes :: EmergencyContactProperty -> Maybe (Value Text)
emailAddress :: EmergencyContactProperty -> Value Text
phoneNumber :: EmergencyContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
phoneNumber :: Maybe (Value Text)
..}
= EmergencyContactProperty {emailAddress :: Value Text
emailAddress = PropertyType "EmailAddress" EmergencyContactProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
phoneNumber :: Maybe (Value Text)
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
phoneNumber :: Maybe (Value Text)
..}
instance Property "PhoneNumber" EmergencyContactProperty where
type PropertyType "PhoneNumber" EmergencyContactProperty = Value Prelude.Text
set :: PropertyType "PhoneNumber" EmergencyContactProperty
-> EmergencyContactProperty -> EmergencyContactProperty
set PropertyType "PhoneNumber" EmergencyContactProperty
newValue EmergencyContactProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EmergencyContactProperty -> ()
contactNotes :: EmergencyContactProperty -> Maybe (Value Text)
emailAddress :: EmergencyContactProperty -> Value Text
phoneNumber :: EmergencyContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
phoneNumber :: Maybe (Value Text)
..}
= EmergencyContactProperty
{phoneNumber :: Maybe (Value Text)
phoneNumber = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PhoneNumber" EmergencyContactProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
haddock_workaround_ :: ()
contactNotes :: Maybe (Value Text)
emailAddress :: Value Text
..}