module Stratosphere.ODB.CloudExadataInfrastructure.CustomerContactProperty (
        CustomerContactProperty(..), mkCustomerContactProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomerContactProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-odb-cloudexadatainfrastructure-customercontact.html>
    CustomerContactProperty {CustomerContactProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-odb-cloudexadatainfrastructure-customercontact.html#cfn-odb-cloudexadatainfrastructure-customercontact-email>
                             CustomerContactProperty -> Maybe (Value Text)
email :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CustomerContactProperty -> CustomerContactProperty -> Bool
(CustomerContactProperty -> CustomerContactProperty -> Bool)
-> (CustomerContactProperty -> CustomerContactProperty -> Bool)
-> Eq CustomerContactProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomerContactProperty -> CustomerContactProperty -> Bool
== :: CustomerContactProperty -> CustomerContactProperty -> Bool
$c/= :: CustomerContactProperty -> CustomerContactProperty -> Bool
/= :: CustomerContactProperty -> CustomerContactProperty -> Bool
Prelude.Eq, Int -> CustomerContactProperty -> ShowS
[CustomerContactProperty] -> ShowS
CustomerContactProperty -> String
(Int -> CustomerContactProperty -> ShowS)
-> (CustomerContactProperty -> String)
-> ([CustomerContactProperty] -> ShowS)
-> Show CustomerContactProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomerContactProperty -> ShowS
showsPrec :: Int -> CustomerContactProperty -> ShowS
$cshow :: CustomerContactProperty -> String
show :: CustomerContactProperty -> String
$cshowList :: [CustomerContactProperty] -> ShowS
showList :: [CustomerContactProperty] -> ShowS
Prelude.Show)
mkCustomerContactProperty :: CustomerContactProperty
mkCustomerContactProperty :: CustomerContactProperty
mkCustomerContactProperty
  = CustomerContactProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), email :: Maybe (Value Text)
email = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomerContactProperty where
  toResourceProperties :: CustomerContactProperty -> ResourceProperties
toResourceProperties CustomerContactProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomerContactProperty -> ()
email :: CustomerContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
email :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ODB::CloudExadataInfrastructure.CustomerContact",
         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 -> 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
"Email" (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)
email])}
instance JSON.ToJSON CustomerContactProperty where
  toJSON :: CustomerContactProperty -> Value
toJSON CustomerContactProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomerContactProperty -> ()
email :: CustomerContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
email :: Maybe (Value Text)
..}
    = [(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 -> 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
"Email" (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)
email]))
instance Property "Email" CustomerContactProperty where
  type PropertyType "Email" CustomerContactProperty = Value Prelude.Text
  set :: PropertyType "Email" CustomerContactProperty
-> CustomerContactProperty -> CustomerContactProperty
set PropertyType "Email" CustomerContactProperty
newValue CustomerContactProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomerContactProperty -> ()
email :: CustomerContactProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
email :: Maybe (Value Text)
..}
    = CustomerContactProperty {email :: Maybe (Value Text)
email = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Email" CustomerContactProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}