module OryKratos.Types.Registration
  ( RegistrationFlow (..),
    RegistrationViaApiResponse (..),
    SubmitSelfServiceRegistrationFlowWithPasswordMethod (..),
  )
where

import OryKratos.Types.Misc
  ( Identity,
    Session,
  )
import OryKratos.Types.Ui (UiContainer)
import Pre

-- |
data RegistrationFlow = RegistrationFlow
  { -- | and so on.
    RegistrationFlow -> Maybe Text
active :: Maybe Text,
    -- | ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.
    RegistrationFlow -> UTCTime
expires_at :: UTCTime,
    -- |
    RegistrationFlow -> Text
id :: Text,
    -- | IssuedAt is the time (UTC) when the flow occurred.
    RegistrationFlow -> UTCTime
issued_at :: UTCTime,
    -- | RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
    RegistrationFlow -> Text
request_url :: Text,
    -- | The flow type can either be `api` or `browser`.
    RegistrationFlow -> Maybe Text
_type :: Maybe Text,
    -- |
    RegistrationFlow -> UiContainer
ui :: UiContainer
  }
  deriving stock (Int -> RegistrationFlow -> ShowS
[RegistrationFlow] -> ShowS
RegistrationFlow -> String
(Int -> RegistrationFlow -> ShowS)
-> (RegistrationFlow -> String)
-> ([RegistrationFlow] -> ShowS)
-> Show RegistrationFlow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegistrationFlow] -> ShowS
$cshowList :: [RegistrationFlow] -> ShowS
show :: RegistrationFlow -> String
$cshow :: RegistrationFlow -> String
showsPrec :: Int -> RegistrationFlow -> ShowS
$cshowsPrec :: Int -> RegistrationFlow -> ShowS
Show, RegistrationFlow -> RegistrationFlow -> Bool
(RegistrationFlow -> RegistrationFlow -> Bool)
-> (RegistrationFlow -> RegistrationFlow -> Bool)
-> Eq RegistrationFlow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegistrationFlow -> RegistrationFlow -> Bool
$c/= :: RegistrationFlow -> RegistrationFlow -> Bool
== :: RegistrationFlow -> RegistrationFlow -> Bool
$c== :: RegistrationFlow -> RegistrationFlow -> Bool
Eq, (forall x. RegistrationFlow -> Rep RegistrationFlow x)
-> (forall x. Rep RegistrationFlow x -> RegistrationFlow)
-> Generic RegistrationFlow
forall x. Rep RegistrationFlow x -> RegistrationFlow
forall x. RegistrationFlow -> Rep RegistrationFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegistrationFlow x -> RegistrationFlow
$cfrom :: forall x. RegistrationFlow -> Rep RegistrationFlow x
Generic, Typeable RegistrationFlow
DataType
Constr
Typeable RegistrationFlow
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RegistrationFlow -> c RegistrationFlow)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RegistrationFlow)
-> (RegistrationFlow -> Constr)
-> (RegistrationFlow -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RegistrationFlow))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c RegistrationFlow))
-> ((forall b. Data b => b -> b)
    -> RegistrationFlow -> RegistrationFlow)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> RegistrationFlow -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> RegistrationFlow -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RegistrationFlow -> m RegistrationFlow)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RegistrationFlow -> m RegistrationFlow)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RegistrationFlow -> m RegistrationFlow)
-> Data RegistrationFlow
RegistrationFlow -> DataType
RegistrationFlow -> Constr
(forall b. Data b => b -> b)
-> RegistrationFlow -> RegistrationFlow
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RegistrationFlow -> c RegistrationFlow
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationFlow
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> RegistrationFlow -> u
forall u. (forall d. Data d => d -> u) -> RegistrationFlow -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationFlow
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RegistrationFlow -> c RegistrationFlow
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RegistrationFlow)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RegistrationFlow)
$cRegistrationFlow :: Constr
$tRegistrationFlow :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
gmapMp :: (forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
gmapM :: (forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RegistrationFlow -> m RegistrationFlow
gmapQi :: Int -> (forall d. Data d => d -> u) -> RegistrationFlow -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> RegistrationFlow -> u
gmapQ :: (forall d. Data d => d -> u) -> RegistrationFlow -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> RegistrationFlow -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> RegistrationFlow -> r
gmapT :: (forall b. Data b => b -> b)
-> RegistrationFlow -> RegistrationFlow
$cgmapT :: (forall b. Data b => b -> b)
-> RegistrationFlow -> RegistrationFlow
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RegistrationFlow)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RegistrationFlow)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c RegistrationFlow)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c RegistrationFlow)
dataTypeOf :: RegistrationFlow -> DataType
$cdataTypeOf :: RegistrationFlow -> DataType
toConstr :: RegistrationFlow -> Constr
$ctoConstr :: RegistrationFlow -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationFlow
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationFlow
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RegistrationFlow -> c RegistrationFlow
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> RegistrationFlow -> c RegistrationFlow
$cp1Data :: Typeable RegistrationFlow
Data)

instance FromJSON RegistrationFlow where
  parseJSON :: Value -> Parser RegistrationFlow
parseJSON =
    Options -> Value -> Parser RegistrationFlow
forall a.
(Generic a, GFromJSON Zero (Rep a)) =>
Options -> Value -> Parser a
genericParseJSON
      Options
defaultOptions
        { constructorTagModifier :: ShowS
constructorTagModifier = ShowS
typeFieldRename,
          fieldLabelModifier :: ShowS
fieldLabelModifier = ShowS
typeFieldRename
        }

instance ToJSON RegistrationFlow where
  toEncoding :: RegistrationFlow -> Encoding
toEncoding =
    Options -> RegistrationFlow -> Encoding
forall a.
(Generic a, GToJSON' Encoding Zero (Rep a)) =>
Options -> a -> Encoding
genericToEncoding
      Options
defaultOptions
        { constructorTagModifier :: ShowS
constructorTagModifier = ShowS
typeFieldRename,
          fieldLabelModifier :: ShowS
fieldLabelModifier = ShowS
typeFieldRename
        }

-- | The Response for Registration Flows via API
data RegistrationViaApiResponse = RegistrationViaApiResponse
  { -- |
    RegistrationViaApiResponse -> Identity
identity :: Identity,
    -- |
    RegistrationViaApiResponse -> Maybe Session
session :: Maybe Session,
    -- | The Session Token  This field is only set when the session hook is configured as a post-registration hook.  A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization Header:  Authorization: bearer ${session-token}  The session token is only issued for API flows, not for Browser flows!
    RegistrationViaApiResponse -> Text
session_token :: Text
  }
  deriving stock (Int -> RegistrationViaApiResponse -> ShowS
[RegistrationViaApiResponse] -> ShowS
RegistrationViaApiResponse -> String
(Int -> RegistrationViaApiResponse -> ShowS)
-> (RegistrationViaApiResponse -> String)
-> ([RegistrationViaApiResponse] -> ShowS)
-> Show RegistrationViaApiResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegistrationViaApiResponse] -> ShowS
$cshowList :: [RegistrationViaApiResponse] -> ShowS
show :: RegistrationViaApiResponse -> String
$cshow :: RegistrationViaApiResponse -> String
showsPrec :: Int -> RegistrationViaApiResponse -> ShowS
$cshowsPrec :: Int -> RegistrationViaApiResponse -> ShowS
Show, RegistrationViaApiResponse -> RegistrationViaApiResponse -> Bool
(RegistrationViaApiResponse -> RegistrationViaApiResponse -> Bool)
-> (RegistrationViaApiResponse
    -> RegistrationViaApiResponse -> Bool)
-> Eq RegistrationViaApiResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegistrationViaApiResponse -> RegistrationViaApiResponse -> Bool
$c/= :: RegistrationViaApiResponse -> RegistrationViaApiResponse -> Bool
== :: RegistrationViaApiResponse -> RegistrationViaApiResponse -> Bool
$c== :: RegistrationViaApiResponse -> RegistrationViaApiResponse -> Bool
Eq, (forall x.
 RegistrationViaApiResponse -> Rep RegistrationViaApiResponse x)
-> (forall x.
    Rep RegistrationViaApiResponse x -> RegistrationViaApiResponse)
-> Generic RegistrationViaApiResponse
forall x.
Rep RegistrationViaApiResponse x -> RegistrationViaApiResponse
forall x.
RegistrationViaApiResponse -> Rep RegistrationViaApiResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegistrationViaApiResponse x -> RegistrationViaApiResponse
$cfrom :: forall x.
RegistrationViaApiResponse -> Rep RegistrationViaApiResponse x
Generic, Typeable RegistrationViaApiResponse
DataType
Constr
Typeable RegistrationViaApiResponse
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> RegistrationViaApiResponse
    -> c RegistrationViaApiResponse)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RegistrationViaApiResponse)
-> (RegistrationViaApiResponse -> Constr)
-> (RegistrationViaApiResponse -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d))
    -> Maybe (c RegistrationViaApiResponse))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c RegistrationViaApiResponse))
-> ((forall b. Data b => b -> b)
    -> RegistrationViaApiResponse -> RegistrationViaApiResponse)
-> (forall r r'.
    (r -> r' -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> RegistrationViaApiResponse
    -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> RegistrationViaApiResponse
    -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> RegistrationViaApiResponse -> [u])
-> (forall u.
    Int
    -> (forall d. Data d => d -> u) -> RegistrationViaApiResponse -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RegistrationViaApiResponse -> m RegistrationViaApiResponse)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RegistrationViaApiResponse -> m RegistrationViaApiResponse)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RegistrationViaApiResponse -> m RegistrationViaApiResponse)
-> Data RegistrationViaApiResponse
RegistrationViaApiResponse -> DataType
RegistrationViaApiResponse -> Constr
(forall b. Data b => b -> b)
-> RegistrationViaApiResponse -> RegistrationViaApiResponse
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RegistrationViaApiResponse
-> c RegistrationViaApiResponse
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationViaApiResponse
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u) -> RegistrationViaApiResponse -> u
forall u.
(forall d. Data d => d -> u) -> RegistrationViaApiResponse -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> RegistrationViaApiResponse
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> RegistrationViaApiResponse
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationViaApiResponse
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RegistrationViaApiResponse
-> c RegistrationViaApiResponse
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c RegistrationViaApiResponse)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RegistrationViaApiResponse)
$cRegistrationViaApiResponse :: Constr
$tRegistrationViaApiResponse :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
gmapMp :: (forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
gmapM :: (forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> RegistrationViaApiResponse -> m RegistrationViaApiResponse
gmapQi :: Int
-> (forall d. Data d => d -> u) -> RegistrationViaApiResponse -> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u) -> RegistrationViaApiResponse -> u
gmapQ :: (forall d. Data d => d -> u) -> RegistrationViaApiResponse -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> RegistrationViaApiResponse -> [u]
gmapQr :: (r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> RegistrationViaApiResponse
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> RegistrationViaApiResponse
-> r
gmapQl :: (r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> RegistrationViaApiResponse
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> RegistrationViaApiResponse
-> r
gmapT :: (forall b. Data b => b -> b)
-> RegistrationViaApiResponse -> RegistrationViaApiResponse
$cgmapT :: (forall b. Data b => b -> b)
-> RegistrationViaApiResponse -> RegistrationViaApiResponse
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RegistrationViaApiResponse)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c RegistrationViaApiResponse)
dataCast1 :: (forall d. Data d => c (t d))
-> Maybe (c RegistrationViaApiResponse)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c RegistrationViaApiResponse)
dataTypeOf :: RegistrationViaApiResponse -> DataType
$cdataTypeOf :: RegistrationViaApiResponse -> DataType
toConstr :: RegistrationViaApiResponse -> Constr
$ctoConstr :: RegistrationViaApiResponse -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationViaApiResponse
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c RegistrationViaApiResponse
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RegistrationViaApiResponse
-> c RegistrationViaApiResponse
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> RegistrationViaApiResponse
-> c RegistrationViaApiResponse
$cp1Data :: Typeable RegistrationViaApiResponse
Data)

instance FromJSON RegistrationViaApiResponse

instance ToJSON RegistrationViaApiResponse where
  toEncoding :: RegistrationViaApiResponse -> Encoding
toEncoding = Options -> RegistrationViaApiResponse -> Encoding
forall a.
(Generic a, GToJSON' Encoding Zero (Rep a)) =>
Options -> a -> Encoding
genericToEncoding Options
defaultOptions

-- | SubmitSelfServiceRegistrationFlowWithPasswordMethod is used to decode the registration form payload when using the password method.
data SubmitSelfServiceRegistrationFlowWithPasswordMethod = SubmitSelfServiceRegistrationFlowWithPasswordMethod
  { -- | The CSRF Token
    SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Maybe Text
csrf_token :: Maybe Text,
    -- | Method to use  This field must be set to `password` when using the password method.
    SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Text
method :: Text,
    -- | Password to sign the user up with
    SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Maybe Text
password :: Maybe Text,
    -- | The identity's traits
    SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Maybe Value
traits :: Maybe Value
  }
  deriving stock (Int -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> ShowS
[SubmitSelfServiceRegistrationFlowWithPasswordMethod] -> ShowS
SubmitSelfServiceRegistrationFlowWithPasswordMethod -> String
(Int
 -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> ShowS)
-> (SubmitSelfServiceRegistrationFlowWithPasswordMethod -> String)
-> ([SubmitSelfServiceRegistrationFlowWithPasswordMethod] -> ShowS)
-> Show SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubmitSelfServiceRegistrationFlowWithPasswordMethod] -> ShowS
$cshowList :: [SubmitSelfServiceRegistrationFlowWithPasswordMethod] -> ShowS
show :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> String
$cshow :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> String
showsPrec :: Int -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> ShowS
$cshowsPrec :: Int -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> ShowS
Show, SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool
(SubmitSelfServiceRegistrationFlowWithPasswordMethod
 -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool)
-> (SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool)
-> Eq SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool
$c/= :: SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool
== :: SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool
$c== :: SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Bool
Eq, (forall x.
 SubmitSelfServiceRegistrationFlowWithPasswordMethod
 -> Rep SubmitSelfServiceRegistrationFlowWithPasswordMethod x)
-> (forall x.
    Rep SubmitSelfServiceRegistrationFlowWithPasswordMethod x
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> Generic SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall x.
Rep SubmitSelfServiceRegistrationFlowWithPasswordMethod x
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall x.
SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> Rep SubmitSelfServiceRegistrationFlowWithPasswordMethod x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SubmitSelfServiceRegistrationFlowWithPasswordMethod x
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cfrom :: forall x.
SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> Rep SubmitSelfServiceRegistrationFlowWithPasswordMethod x
Generic, Typeable SubmitSelfServiceRegistrationFlowWithPasswordMethod
DataType
Constr
Typeable SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r)
    -> Constr
    -> c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> (SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Constr)
-> (SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d))
    -> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod))
-> ((forall b. Data b => b -> b)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> (forall r r'.
    (r -> r' -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> r)
-> (forall u.
    (forall d. Data d => d -> u)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> [u])
-> (forall u.
    Int
    -> (forall d. Data d => d -> u)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> m SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> m SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SubmitSelfServiceRegistrationFlowWithPasswordMethod
    -> m SubmitSelfServiceRegistrationFlowWithPasswordMethod)
-> Data SubmitSelfServiceRegistrationFlowWithPasswordMethod
SubmitSelfServiceRegistrationFlowWithPasswordMethod -> DataType
SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Constr
(forall b. Data b => b -> b)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int
-> (forall d. Data d => d -> u)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> u
forall u.
(forall d. Data d => d -> u)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
$cSubmitSelfServiceRegistrationFlowWithPasswordMethod :: Constr
$tSubmitSelfServiceRegistrationFlowWithPasswordMethod :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
gmapMp :: (forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
gmapM :: (forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> m SubmitSelfServiceRegistrationFlowWithPasswordMethod
gmapQi :: Int
-> (forall d. Data d => d -> u)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> u
$cgmapQi :: forall u.
Int
-> (forall d. Data d => d -> u)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> u
gmapQ :: (forall d. Data d => d -> u)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> [u]
gmapQr :: (r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> r
gmapQl :: (r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> r
gmapT :: (forall b. Data b => b -> b)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cgmapT :: (forall b. Data b => b -> b)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
dataCast1 :: (forall d. Data d => c (t d))
-> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c SubmitSelfServiceRegistrationFlowWithPasswordMethod)
dataTypeOf :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> DataType
$cdataTypeOf :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> DataType
toConstr :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Constr
$ctoConstr :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r)
-> Constr
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod
-> c SubmitSelfServiceRegistrationFlowWithPasswordMethod
$cp1Data :: Typeable SubmitSelfServiceRegistrationFlowWithPasswordMethod
Data)

instance FromJSON SubmitSelfServiceRegistrationFlowWithPasswordMethod

instance ToJSON SubmitSelfServiceRegistrationFlowWithPasswordMethod where
  toEncoding :: SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Encoding
toEncoding = Options
-> SubmitSelfServiceRegistrationFlowWithPasswordMethod -> Encoding
forall a.
(Generic a, GToJSON' Encoding Zero (Rep a)) =>
Options -> a -> Encoding
genericToEncoding Options
defaultOptions