module Stratosphere.Cognito.UserPoolResourceServer (
        module Exports, UserPoolResourceServer(..),
        mkUserPoolResourceServer
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cognito.UserPoolResourceServer.ResourceServerScopeTypeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserPoolResourceServer
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolresourceserver.html>
    UserPoolResourceServer {UserPoolResourceServer -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolresourceserver.html#cfn-cognito-userpoolresourceserver-identifier>
                            UserPoolResourceServer -> Value Text
identifier :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolresourceserver.html#cfn-cognito-userpoolresourceserver-name>
                            UserPoolResourceServer -> Value Text
name :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolresourceserver.html#cfn-cognito-userpoolresourceserver-scopes>
                            UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
scopes :: (Prelude.Maybe [ResourceServerScopeTypeProperty]),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolresourceserver.html#cfn-cognito-userpoolresourceserver-userpoolid>
                            UserPoolResourceServer -> Value Text
userPoolId :: (Value Prelude.Text)}
  deriving stock (UserPoolResourceServer -> UserPoolResourceServer -> Bool
(UserPoolResourceServer -> UserPoolResourceServer -> Bool)
-> (UserPoolResourceServer -> UserPoolResourceServer -> Bool)
-> Eq UserPoolResourceServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserPoolResourceServer -> UserPoolResourceServer -> Bool
== :: UserPoolResourceServer -> UserPoolResourceServer -> Bool
$c/= :: UserPoolResourceServer -> UserPoolResourceServer -> Bool
/= :: UserPoolResourceServer -> UserPoolResourceServer -> Bool
Prelude.Eq, Int -> UserPoolResourceServer -> ShowS
[UserPoolResourceServer] -> ShowS
UserPoolResourceServer -> String
(Int -> UserPoolResourceServer -> ShowS)
-> (UserPoolResourceServer -> String)
-> ([UserPoolResourceServer] -> ShowS)
-> Show UserPoolResourceServer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserPoolResourceServer -> ShowS
showsPrec :: Int -> UserPoolResourceServer -> ShowS
$cshow :: UserPoolResourceServer -> String
show :: UserPoolResourceServer -> String
$cshowList :: [UserPoolResourceServer] -> ShowS
showList :: [UserPoolResourceServer] -> ShowS
Prelude.Show)
mkUserPoolResourceServer ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> UserPoolResourceServer
mkUserPoolResourceServer :: Value Text -> Value Text -> Value Text -> UserPoolResourceServer
mkUserPoolResourceServer Value Text
identifier Value Text
name Value Text
userPoolId
  = UserPoolResourceServer
      {haddock_workaround_ :: ()
haddock_workaround_ = (), identifier :: Value Text
identifier = Value Text
identifier, name :: Value Text
name = Value Text
name,
       userPoolId :: Value Text
userPoolId = Value Text
userPoolId, scopes :: Maybe [ResourceServerScopeTypeProperty]
scopes = Maybe [ResourceServerScopeTypeProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserPoolResourceServer where
  toResourceProperties :: UserPoolResourceServer -> ResourceProperties
toResourceProperties UserPoolResourceServer {Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: UserPoolResourceServer -> ()
identifier :: UserPoolResourceServer -> Value Text
name :: UserPoolResourceServer -> Value Text
scopes :: UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
userPoolId :: UserPoolResourceServer -> Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPoolResourceServer",
         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
"Identifier" 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
identifier, Key
"Name" 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
name,
                            Key
"UserPoolId" 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
userPoolId]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [ResourceServerScopeTypeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scopes" ([ResourceServerScopeTypeProperty] -> (Key, Value))
-> Maybe [ResourceServerScopeTypeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceServerScopeTypeProperty]
scopes]))}
instance JSON.ToJSON UserPoolResourceServer where
  toJSON :: UserPoolResourceServer -> Value
toJSON UserPoolResourceServer {Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: UserPoolResourceServer -> ()
identifier :: UserPoolResourceServer -> Value Text
name :: UserPoolResourceServer -> Value Text
scopes :: UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
userPoolId :: UserPoolResourceServer -> Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: 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
"Identifier" 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
identifier, Key
"Name" 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
name,
               Key
"UserPoolId" 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
userPoolId]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [ResourceServerScopeTypeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scopes" ([ResourceServerScopeTypeProperty] -> (Key, Value))
-> Maybe [ResourceServerScopeTypeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceServerScopeTypeProperty]
scopes])))
instance Property "Identifier" UserPoolResourceServer where
  type PropertyType "Identifier" UserPoolResourceServer = Value Prelude.Text
  set :: PropertyType "Identifier" UserPoolResourceServer
-> UserPoolResourceServer -> UserPoolResourceServer
set PropertyType "Identifier" UserPoolResourceServer
newValue UserPoolResourceServer {Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: UserPoolResourceServer -> ()
identifier :: UserPoolResourceServer -> Value Text
name :: UserPoolResourceServer -> Value Text
scopes :: UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
userPoolId :: UserPoolResourceServer -> Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
    = UserPoolResourceServer {identifier :: Value Text
identifier = PropertyType "Identifier" UserPoolResourceServer
Value Text
newValue, Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
haddock_workaround_ :: ()
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
instance Property "Name" UserPoolResourceServer where
  type PropertyType "Name" UserPoolResourceServer = Value Prelude.Text
  set :: PropertyType "Name" UserPoolResourceServer
-> UserPoolResourceServer -> UserPoolResourceServer
set PropertyType "Name" UserPoolResourceServer
newValue UserPoolResourceServer {Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: UserPoolResourceServer -> ()
identifier :: UserPoolResourceServer -> Value Text
name :: UserPoolResourceServer -> Value Text
scopes :: UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
userPoolId :: UserPoolResourceServer -> Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
    = UserPoolResourceServer {name :: Value Text
name = PropertyType "Name" UserPoolResourceServer
Value Text
newValue, Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: ()
identifier :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
haddock_workaround_ :: ()
identifier :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
instance Property "Scopes" UserPoolResourceServer where
  type PropertyType "Scopes" UserPoolResourceServer = [ResourceServerScopeTypeProperty]
  set :: PropertyType "Scopes" UserPoolResourceServer
-> UserPoolResourceServer -> UserPoolResourceServer
set PropertyType "Scopes" UserPoolResourceServer
newValue UserPoolResourceServer {Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: UserPoolResourceServer -> ()
identifier :: UserPoolResourceServer -> Value Text
name :: UserPoolResourceServer -> Value Text
scopes :: UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
userPoolId :: UserPoolResourceServer -> Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
    = UserPoolResourceServer {scopes :: Maybe [ResourceServerScopeTypeProperty]
scopes = [ResourceServerScopeTypeProperty]
-> Maybe [ResourceServerScopeTypeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ResourceServerScopeTypeProperty]
PropertyType "Scopes" UserPoolResourceServer
newValue, ()
Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
userPoolId :: Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
userPoolId :: Value Text
..}
instance Property "UserPoolId" UserPoolResourceServer where
  type PropertyType "UserPoolId" UserPoolResourceServer = Value Prelude.Text
  set :: PropertyType "UserPoolId" UserPoolResourceServer
-> UserPoolResourceServer -> UserPoolResourceServer
set PropertyType "UserPoolId" UserPoolResourceServer
newValue UserPoolResourceServer {Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: UserPoolResourceServer -> ()
identifier :: UserPoolResourceServer -> Value Text
name :: UserPoolResourceServer -> Value Text
scopes :: UserPoolResourceServer -> Maybe [ResourceServerScopeTypeProperty]
userPoolId :: UserPoolResourceServer -> Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
userPoolId :: Value Text
..}
    = UserPoolResourceServer {userPoolId :: Value Text
userPoolId = PropertyType "UserPoolId" UserPoolResourceServer
Value Text
newValue, Maybe [ResourceServerScopeTypeProperty]
()
Value Text
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
haddock_workaround_ :: ()
identifier :: Value Text
name :: Value Text
scopes :: Maybe [ResourceServerScopeTypeProperty]
..}