module Stratosphere.Cognito.UserPool.StringAttributeConstraintsProperty (
StringAttributeConstraintsProperty(..),
mkStringAttributeConstraintsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StringAttributeConstraintsProperty
=
StringAttributeConstraintsProperty {StringAttributeConstraintsProperty -> ()
haddock_workaround_ :: (),
StringAttributeConstraintsProperty -> Maybe (Value Text)
maxLength :: (Prelude.Maybe (Value Prelude.Text)),
StringAttributeConstraintsProperty -> Maybe (Value Text)
minLength :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool
(StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool)
-> (StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool)
-> Eq StringAttributeConstraintsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool
== :: StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool
$c/= :: StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool
/= :: StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty -> Bool
Prelude.Eq, Int -> StringAttributeConstraintsProperty -> ShowS
[StringAttributeConstraintsProperty] -> ShowS
StringAttributeConstraintsProperty -> String
(Int -> StringAttributeConstraintsProperty -> ShowS)
-> (StringAttributeConstraintsProperty -> String)
-> ([StringAttributeConstraintsProperty] -> ShowS)
-> Show StringAttributeConstraintsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StringAttributeConstraintsProperty -> ShowS
showsPrec :: Int -> StringAttributeConstraintsProperty -> ShowS
$cshow :: StringAttributeConstraintsProperty -> String
show :: StringAttributeConstraintsProperty -> String
$cshowList :: [StringAttributeConstraintsProperty] -> ShowS
showList :: [StringAttributeConstraintsProperty] -> ShowS
Prelude.Show)
mkStringAttributeConstraintsProperty ::
StringAttributeConstraintsProperty
mkStringAttributeConstraintsProperty :: StringAttributeConstraintsProperty
mkStringAttributeConstraintsProperty
= StringAttributeConstraintsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxLength :: Maybe (Value Text)
maxLength = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
minLength :: Maybe (Value Text)
minLength = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StringAttributeConstraintsProperty where
toResourceProperties :: StringAttributeConstraintsProperty -> ResourceProperties
toResourceProperties StringAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: StringAttributeConstraintsProperty -> ()
maxLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
minLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxLength :: Maybe (Value Text)
minLength :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.StringAttributeConstraints",
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
"MaxLength" (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)
maxLength,
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
"MinLength" (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)
minLength])}
instance JSON.ToJSON StringAttributeConstraintsProperty where
toJSON :: StringAttributeConstraintsProperty -> Value
toJSON StringAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: StringAttributeConstraintsProperty -> ()
maxLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
minLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxLength :: Maybe (Value Text)
minLength :: 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
"MaxLength" (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)
maxLength,
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
"MinLength" (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)
minLength]))
instance Property "MaxLength" StringAttributeConstraintsProperty where
type PropertyType "MaxLength" StringAttributeConstraintsProperty = Value Prelude.Text
set :: PropertyType "MaxLength" StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty
set PropertyType "MaxLength" StringAttributeConstraintsProperty
newValue StringAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: StringAttributeConstraintsProperty -> ()
maxLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
minLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxLength :: Maybe (Value Text)
minLength :: Maybe (Value Text)
..}
= StringAttributeConstraintsProperty
{maxLength :: Maybe (Value Text)
maxLength = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxLength" StringAttributeConstraintsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
minLength :: Maybe (Value Text)
haddock_workaround_ :: ()
minLength :: Maybe (Value Text)
..}
instance Property "MinLength" StringAttributeConstraintsProperty where
type PropertyType "MinLength" StringAttributeConstraintsProperty = Value Prelude.Text
set :: PropertyType "MinLength" StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty
-> StringAttributeConstraintsProperty
set PropertyType "MinLength" StringAttributeConstraintsProperty
newValue StringAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: StringAttributeConstraintsProperty -> ()
maxLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
minLength :: StringAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxLength :: Maybe (Value Text)
minLength :: Maybe (Value Text)
..}
= StringAttributeConstraintsProperty
{minLength :: Maybe (Value Text)
minLength = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinLength" StringAttributeConstraintsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
maxLength :: Maybe (Value Text)
haddock_workaround_ :: ()
maxLength :: Maybe (Value Text)
..}