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