module Stratosphere.Cognito.UserPoolGroup (
        UserPoolGroup(..), mkUserPoolGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserPoolGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html>
    UserPoolGroup {UserPoolGroup -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html#cfn-cognito-userpoolgroup-description>
                   UserPoolGroup -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html#cfn-cognito-userpoolgroup-groupname>
                   UserPoolGroup -> Maybe (Value Text)
groupName :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html#cfn-cognito-userpoolgroup-precedence>
                   UserPoolGroup -> Maybe (Value Integer)
precedence :: (Prelude.Maybe (Value Prelude.Integer)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html#cfn-cognito-userpoolgroup-rolearn>
                   UserPoolGroup -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolgroup.html#cfn-cognito-userpoolgroup-userpoolid>
                   UserPoolGroup -> Value Text
userPoolId :: (Value Prelude.Text)}
  deriving stock (UserPoolGroup -> UserPoolGroup -> Bool
(UserPoolGroup -> UserPoolGroup -> Bool)
-> (UserPoolGroup -> UserPoolGroup -> Bool) -> Eq UserPoolGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserPoolGroup -> UserPoolGroup -> Bool
== :: UserPoolGroup -> UserPoolGroup -> Bool
$c/= :: UserPoolGroup -> UserPoolGroup -> Bool
/= :: UserPoolGroup -> UserPoolGroup -> Bool
Prelude.Eq, Int -> UserPoolGroup -> ShowS
[UserPoolGroup] -> ShowS
UserPoolGroup -> String
(Int -> UserPoolGroup -> ShowS)
-> (UserPoolGroup -> String)
-> ([UserPoolGroup] -> ShowS)
-> Show UserPoolGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserPoolGroup -> ShowS
showsPrec :: Int -> UserPoolGroup -> ShowS
$cshow :: UserPoolGroup -> String
show :: UserPoolGroup -> String
$cshowList :: [UserPoolGroup] -> ShowS
showList :: [UserPoolGroup] -> ShowS
Prelude.Show)
mkUserPoolGroup :: Value Prelude.Text -> UserPoolGroup
mkUserPoolGroup :: Value Text -> UserPoolGroup
mkUserPoolGroup Value Text
userPoolId
  = UserPoolGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), userPoolId :: Value Text
userPoolId = Value Text
userPoolId,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, groupName :: Maybe (Value Text)
groupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       precedence :: Maybe (Value Integer)
precedence = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserPoolGroup where
  toResourceProperties :: UserPoolGroup -> ResourceProperties
toResourceProperties UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPoolGroup",
         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
"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 -> 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
"Description" (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)
description,
                               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
"GroupName" (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)
groupName,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Precedence" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
precedence,
                               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
"RoleArn" (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)
roleArn]))}
instance JSON.ToJSON UserPoolGroup where
  toJSON :: UserPoolGroup -> Value
toJSON UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
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
"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 -> 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
"Description" (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)
description,
                  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
"GroupName" (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)
groupName,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Precedence" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
precedence,
                  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
"RoleArn" (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)
roleArn])))
instance Property "Description" UserPoolGroup where
  type PropertyType "Description" UserPoolGroup = Value Prelude.Text
  set :: PropertyType "Description" UserPoolGroup
-> UserPoolGroup -> UserPoolGroup
set PropertyType "Description" UserPoolGroup
newValue UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
    = UserPoolGroup {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" UserPoolGroup
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
instance Property "GroupName" UserPoolGroup where
  type PropertyType "GroupName" UserPoolGroup = Value Prelude.Text
  set :: PropertyType "GroupName" UserPoolGroup
-> UserPoolGroup -> UserPoolGroup
set PropertyType "GroupName" UserPoolGroup
newValue UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
    = UserPoolGroup {groupName :: Maybe (Value Text)
groupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GroupName" UserPoolGroup
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
instance Property "Precedence" UserPoolGroup where
  type PropertyType "Precedence" UserPoolGroup = Value Prelude.Integer
  set :: PropertyType "Precedence" UserPoolGroup
-> UserPoolGroup -> UserPoolGroup
set PropertyType "Precedence" UserPoolGroup
newValue UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
    = UserPoolGroup {precedence :: Maybe (Value Integer)
precedence = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Precedence" UserPoolGroup
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
instance Property "RoleArn" UserPoolGroup where
  type PropertyType "RoleArn" UserPoolGroup = Value Prelude.Text
  set :: PropertyType "RoleArn" UserPoolGroup
-> UserPoolGroup -> UserPoolGroup
set PropertyType "RoleArn" UserPoolGroup
newValue UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
    = UserPoolGroup {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" UserPoolGroup
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
userPoolId :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
userPoolId :: Value Text
..}
instance Property "UserPoolId" UserPoolGroup where
  type PropertyType "UserPoolId" UserPoolGroup = Value Prelude.Text
  set :: PropertyType "UserPoolId" UserPoolGroup
-> UserPoolGroup -> UserPoolGroup
set PropertyType "UserPoolId" UserPoolGroup
newValue UserPoolGroup {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserPoolGroup -> ()
description :: UserPoolGroup -> Maybe (Value Text)
groupName :: UserPoolGroup -> Maybe (Value Text)
precedence :: UserPoolGroup -> Maybe (Value Integer)
roleArn :: UserPoolGroup -> Maybe (Value Text)
userPoolId :: UserPoolGroup -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
userPoolId :: Value Text
..}
    = UserPoolGroup {userPoolId :: Value Text
userPoolId = PropertyType "UserPoolId" UserPoolGroup
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
groupName :: Maybe (Value Text)
precedence :: Maybe (Value Integer)
roleArn :: Maybe (Value Text)
..}