module Stratosphere.Cognito.UserPoolClient.RefreshTokenRotationProperty (
        RefreshTokenRotationProperty(..), mkRefreshTokenRotationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RefreshTokenRotationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolclient-refreshtokenrotation.html>
    RefreshTokenRotationProperty {RefreshTokenRotationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolclient-refreshtokenrotation.html#cfn-cognito-userpoolclient-refreshtokenrotation-feature>
                                  RefreshTokenRotationProperty -> Maybe (Value Text)
feature :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolclient-refreshtokenrotation.html#cfn-cognito-userpoolclient-refreshtokenrotation-retrygraceperiodseconds>
                                  RefreshTokenRotationProperty -> Maybe (Value Integer)
retryGracePeriodSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> Bool
(RefreshTokenRotationProperty
 -> RefreshTokenRotationProperty -> Bool)
-> (RefreshTokenRotationProperty
    -> RefreshTokenRotationProperty -> Bool)
-> Eq RefreshTokenRotationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> Bool
== :: RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> Bool
$c/= :: RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> Bool
/= :: RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> Bool
Prelude.Eq, Int -> RefreshTokenRotationProperty -> ShowS
[RefreshTokenRotationProperty] -> ShowS
RefreshTokenRotationProperty -> String
(Int -> RefreshTokenRotationProperty -> ShowS)
-> (RefreshTokenRotationProperty -> String)
-> ([RefreshTokenRotationProperty] -> ShowS)
-> Show RefreshTokenRotationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RefreshTokenRotationProperty -> ShowS
showsPrec :: Int -> RefreshTokenRotationProperty -> ShowS
$cshow :: RefreshTokenRotationProperty -> String
show :: RefreshTokenRotationProperty -> String
$cshowList :: [RefreshTokenRotationProperty] -> ShowS
showList :: [RefreshTokenRotationProperty] -> ShowS
Prelude.Show)
mkRefreshTokenRotationProperty :: RefreshTokenRotationProperty
mkRefreshTokenRotationProperty :: RefreshTokenRotationProperty
mkRefreshTokenRotationProperty
  = RefreshTokenRotationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), feature :: Maybe (Value Text)
feature = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       retryGracePeriodSeconds :: Maybe (Value Integer)
retryGracePeriodSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RefreshTokenRotationProperty where
  toResourceProperties :: RefreshTokenRotationProperty -> ResourceProperties
toResourceProperties RefreshTokenRotationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RefreshTokenRotationProperty -> ()
feature :: RefreshTokenRotationProperty -> Maybe (Value Text)
retryGracePeriodSeconds :: RefreshTokenRotationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
feature :: Maybe (Value Text)
retryGracePeriodSeconds :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPoolClient.RefreshTokenRotation",
         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
"Feature" (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)
feature,
                            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
"RetryGracePeriodSeconds"
                              (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)
retryGracePeriodSeconds])}
instance JSON.ToJSON RefreshTokenRotationProperty where
  toJSON :: RefreshTokenRotationProperty -> Value
toJSON RefreshTokenRotationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RefreshTokenRotationProperty -> ()
feature :: RefreshTokenRotationProperty -> Maybe (Value Text)
retryGracePeriodSeconds :: RefreshTokenRotationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
feature :: Maybe (Value Text)
retryGracePeriodSeconds :: Maybe (Value Integer)
..}
    = [(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
"Feature" (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)
feature,
               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
"RetryGracePeriodSeconds"
                 (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)
retryGracePeriodSeconds]))
instance Property "Feature" RefreshTokenRotationProperty where
  type PropertyType "Feature" RefreshTokenRotationProperty = Value Prelude.Text
  set :: PropertyType "Feature" RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> RefreshTokenRotationProperty
set PropertyType "Feature" RefreshTokenRotationProperty
newValue RefreshTokenRotationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RefreshTokenRotationProperty -> ()
feature :: RefreshTokenRotationProperty -> Maybe (Value Text)
retryGracePeriodSeconds :: RefreshTokenRotationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
feature :: Maybe (Value Text)
retryGracePeriodSeconds :: Maybe (Value Integer)
..}
    = RefreshTokenRotationProperty
        {feature :: Maybe (Value Text)
feature = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Feature" RefreshTokenRotationProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
retryGracePeriodSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
retryGracePeriodSeconds :: Maybe (Value Integer)
..}
instance Property "RetryGracePeriodSeconds" RefreshTokenRotationProperty where
  type PropertyType "RetryGracePeriodSeconds" RefreshTokenRotationProperty = Value Prelude.Integer
  set :: PropertyType "RetryGracePeriodSeconds" RefreshTokenRotationProperty
-> RefreshTokenRotationProperty -> RefreshTokenRotationProperty
set PropertyType "RetryGracePeriodSeconds" RefreshTokenRotationProperty
newValue RefreshTokenRotationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RefreshTokenRotationProperty -> ()
feature :: RefreshTokenRotationProperty -> Maybe (Value Text)
retryGracePeriodSeconds :: RefreshTokenRotationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
feature :: Maybe (Value Text)
retryGracePeriodSeconds :: Maybe (Value Integer)
..}
    = RefreshTokenRotationProperty
        {retryGracePeriodSeconds :: Maybe (Value Integer)
retryGracePeriodSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RetryGracePeriodSeconds" RefreshTokenRotationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
feature :: Maybe (Value Text)
haddock_workaround_ :: ()
feature :: Maybe (Value Text)
..}