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: UserPoolGroup {haddock_workaround_ :: (), -- | See: description :: (Prelude.Maybe (Value Prelude.Text)), -- | See: groupName :: (Prelude.Maybe (Value Prelude.Text)), -- | See: precedence :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: roleArn :: (Prelude.Maybe (Value Prelude.Text)), -- | See: userPoolId :: (Value Prelude.Text)} deriving stock (Prelude.Eq, Prelude.Show) mkUserPoolGroup :: Value Prelude.Text -> UserPoolGroup mkUserPoolGroup userPoolId = UserPoolGroup {haddock_workaround_ = (), userPoolId = userPoolId, description = Prelude.Nothing, groupName = Prelude.Nothing, precedence = Prelude.Nothing, roleArn = Prelude.Nothing} instance ToResourceProperties UserPoolGroup where toResourceProperties UserPoolGroup {..} = ResourceProperties {awsType = "AWS::Cognito::UserPoolGroup", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["UserPoolId" JSON..= userPoolId] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "GroupName" Prelude.<$> groupName, (JSON..=) "Precedence" Prelude.<$> precedence, (JSON..=) "RoleArn" Prelude.<$> roleArn]))} instance JSON.ToJSON UserPoolGroup where toJSON UserPoolGroup {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["UserPoolId" JSON..= userPoolId] (Prelude.catMaybes [(JSON..=) "Description" Prelude.<$> description, (JSON..=) "GroupName" Prelude.<$> groupName, (JSON..=) "Precedence" Prelude.<$> precedence, (JSON..=) "RoleArn" Prelude.<$> roleArn]))) instance Property "Description" UserPoolGroup where type PropertyType "Description" UserPoolGroup = Value Prelude.Text set newValue UserPoolGroup {..} = UserPoolGroup {description = Prelude.pure newValue, ..} instance Property "GroupName" UserPoolGroup where type PropertyType "GroupName" UserPoolGroup = Value Prelude.Text set newValue UserPoolGroup {..} = UserPoolGroup {groupName = Prelude.pure newValue, ..} instance Property "Precedence" UserPoolGroup where type PropertyType "Precedence" UserPoolGroup = Value Prelude.Integer set newValue UserPoolGroup {..} = UserPoolGroup {precedence = Prelude.pure newValue, ..} instance Property "RoleArn" UserPoolGroup where type PropertyType "RoleArn" UserPoolGroup = Value Prelude.Text set newValue UserPoolGroup {..} = UserPoolGroup {roleArn = Prelude.pure newValue, ..} instance Property "UserPoolId" UserPoolGroup where type PropertyType "UserPoolId" UserPoolGroup = Value Prelude.Text set newValue UserPoolGroup {..} = UserPoolGroup {userPoolId = newValue, ..}