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