{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-}
module ORYHydra.Model where
import ORYHydra.Core
import ORYHydra.MimeTypes
import Data.Aeson ((.:),(.:!),(.:?),(.=))
import qualified Control.Arrow as P (left)
import qualified Data.Aeson as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString.Lazy as BL
import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
import qualified Data.Foldable as P
import qualified Data.HashMap.Lazy as HM
import qualified Data.Map as Map
import qualified Data.Maybe as P
import qualified Data.Set as Set
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Time as TI
import qualified Lens.Micro as L
import qualified Web.FormUrlEncoded as WH
import qualified Web.HttpApiData as WH
import Control.Applicative ((<|>))
import Control.Applicative (Alternative)
import Data.Function ((&))
import Data.Monoid ((<>))
import Data.Text (Text)
import Prelude (($),(/=),(.),(<$>),(<*>),(>>=),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
import qualified Prelude as P
newtype All = All { All -> Bool
unAll :: Bool } deriving (All -> All -> Bool
(All -> All -> Bool) -> (All -> All -> Bool) -> Eq All
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: All -> All -> Bool
$c/= :: All -> All -> Bool
== :: All -> All -> Bool
$c== :: All -> All -> Bool
P.Eq, Int -> All -> ShowS
[All] -> ShowS
All -> String
(Int -> All -> ShowS)
-> (All -> String) -> ([All] -> ShowS) -> Show All
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [All] -> ShowS
$cshowList :: [All] -> ShowS
show :: All -> String
$cshow :: All -> String
showsPrec :: Int -> All -> ShowS
$cshowsPrec :: Int -> All -> ShowS
P.Show)
newtype Client = Client { Client -> Text
unClient :: Text } deriving (Client -> Client -> Bool
(Client -> Client -> Bool)
-> (Client -> Client -> Bool) -> Eq Client
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Client -> Client -> Bool
$c/= :: Client -> Client -> Bool
== :: Client -> Client -> Bool
$c== :: Client -> Client -> Bool
P.Eq, Int -> Client -> ShowS
[Client] -> ShowS
Client -> String
(Int -> Client -> ShowS)
-> (Client -> String) -> ([Client] -> ShowS) -> Show Client
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Client] -> ShowS
$cshowList :: [Client] -> ShowS
show :: Client -> String
$cshow :: Client -> String
showsPrec :: Int -> Client -> ShowS
$cshowsPrec :: Int -> Client -> ShowS
P.Show)
newtype ClientId = ClientId { ClientId -> Text
unClientId :: Text } deriving (ClientId -> ClientId -> Bool
(ClientId -> ClientId -> Bool)
-> (ClientId -> ClientId -> Bool) -> Eq ClientId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClientId -> ClientId -> Bool
$c/= :: ClientId -> ClientId -> Bool
== :: ClientId -> ClientId -> Bool
$c== :: ClientId -> ClientId -> Bool
P.Eq, Int -> ClientId -> ShowS
[ClientId] -> ShowS
ClientId -> String
(Int -> ClientId -> ShowS)
-> (ClientId -> String) -> ([ClientId] -> ShowS) -> Show ClientId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClientId] -> ShowS
$cshowList :: [ClientId] -> ShowS
show :: ClientId -> String
$cshow :: ClientId -> String
showsPrec :: Int -> ClientId -> ShowS
$cshowsPrec :: Int -> ClientId -> ShowS
P.Show)
newtype Code = Code { Code -> Text
unCode :: Text } deriving (Code -> Code -> Bool
(Code -> Code -> Bool) -> (Code -> Code -> Bool) -> Eq Code
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Code -> Code -> Bool
$c/= :: Code -> Code -> Bool
== :: Code -> Code -> Bool
$c== :: Code -> Code -> Bool
P.Eq, Int -> Code -> ShowS
[Code] -> ShowS
Code -> String
(Int -> Code -> ShowS)
-> (Code -> String) -> ([Code] -> ShowS) -> Show Code
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Code] -> ShowS
$cshowList :: [Code] -> ShowS
show :: Code -> String
$cshow :: Code -> String
showsPrec :: Int -> Code -> ShowS
$cshowsPrec :: Int -> Code -> ShowS
P.Show)
newtype ConsentChallenge = ConsentChallenge { ConsentChallenge -> Text
unConsentChallenge :: Text } deriving (ConsentChallenge -> ConsentChallenge -> Bool
(ConsentChallenge -> ConsentChallenge -> Bool)
-> (ConsentChallenge -> ConsentChallenge -> Bool)
-> Eq ConsentChallenge
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsentChallenge -> ConsentChallenge -> Bool
$c/= :: ConsentChallenge -> ConsentChallenge -> Bool
== :: ConsentChallenge -> ConsentChallenge -> Bool
$c== :: ConsentChallenge -> ConsentChallenge -> Bool
P.Eq, Int -> ConsentChallenge -> ShowS
[ConsentChallenge] -> ShowS
ConsentChallenge -> String
(Int -> ConsentChallenge -> ShowS)
-> (ConsentChallenge -> String)
-> ([ConsentChallenge] -> ShowS)
-> Show ConsentChallenge
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConsentChallenge] -> ShowS
$cshowList :: [ConsentChallenge] -> ShowS
show :: ConsentChallenge -> String
$cshow :: ConsentChallenge -> String
showsPrec :: Int -> ConsentChallenge -> ShowS
$cshowsPrec :: Int -> ConsentChallenge -> ShowS
P.Show)
newtype GrantType = GrantType { GrantType -> Text
unGrantType :: Text } deriving (GrantType -> GrantType -> Bool
(GrantType -> GrantType -> Bool)
-> (GrantType -> GrantType -> Bool) -> Eq GrantType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GrantType -> GrantType -> Bool
$c/= :: GrantType -> GrantType -> Bool
== :: GrantType -> GrantType -> Bool
$c== :: GrantType -> GrantType -> Bool
P.Eq, Int -> GrantType -> ShowS
[GrantType] -> ShowS
GrantType -> String
(Int -> GrantType -> ShowS)
-> (GrantType -> String)
-> ([GrantType] -> ShowS)
-> Show GrantType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GrantType] -> ShowS
$cshowList :: [GrantType] -> ShowS
show :: GrantType -> String
$cshow :: GrantType -> String
showsPrec :: Int -> GrantType -> ShowS
$cshowsPrec :: Int -> GrantType -> ShowS
P.Show)
newtype Id = Id { Id -> Text
unId :: Text } deriving (Id -> Id -> Bool
(Id -> Id -> Bool) -> (Id -> Id -> Bool) -> Eq Id
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Id -> Id -> Bool
$c/= :: Id -> Id -> Bool
== :: Id -> Id -> Bool
$c== :: Id -> Id -> Bool
P.Eq, Int -> Id -> ShowS
[Id] -> ShowS
Id -> String
(Int -> Id -> ShowS)
-> (Id -> String) -> ([Id] -> ShowS) -> Show Id
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Id] -> ShowS
$cshowList :: [Id] -> ShowS
show :: Id -> String
$cshow :: Id -> String
showsPrec :: Int -> Id -> ShowS
$cshowsPrec :: Int -> Id -> ShowS
P.Show)
newtype Kid = Kid { Kid -> Text
unKid :: Text } deriving (Kid -> Kid -> Bool
(Kid -> Kid -> Bool) -> (Kid -> Kid -> Bool) -> Eq Kid
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Kid -> Kid -> Bool
$c/= :: Kid -> Kid -> Bool
== :: Kid -> Kid -> Bool
$c== :: Kid -> Kid -> Bool
P.Eq, Int -> Kid -> ShowS
[Kid] -> ShowS
Kid -> String
(Int -> Kid -> ShowS)
-> (Kid -> String) -> ([Kid] -> ShowS) -> Show Kid
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Kid] -> ShowS
$cshowList :: [Kid] -> ShowS
show :: Kid -> String
$cshow :: Kid -> String
showsPrec :: Int -> Kid -> ShowS
$cshowsPrec :: Int -> Kid -> ShowS
P.Show)
newtype Limit = Limit { Limit -> Integer
unLimit :: Integer } deriving (Limit -> Limit -> Bool
(Limit -> Limit -> Bool) -> (Limit -> Limit -> Bool) -> Eq Limit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Limit -> Limit -> Bool
$c/= :: Limit -> Limit -> Bool
== :: Limit -> Limit -> Bool
$c== :: Limit -> Limit -> Bool
P.Eq, Int -> Limit -> ShowS
[Limit] -> ShowS
Limit -> String
(Int -> Limit -> ShowS)
-> (Limit -> String) -> ([Limit] -> ShowS) -> Show Limit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Limit] -> ShowS
$cshowList :: [Limit] -> ShowS
show :: Limit -> String
$cshow :: Limit -> String
showsPrec :: Int -> Limit -> ShowS
$cshowsPrec :: Int -> Limit -> ShowS
P.Show)
newtype LoginChallenge = LoginChallenge { LoginChallenge -> Text
unLoginChallenge :: Text } deriving (LoginChallenge -> LoginChallenge -> Bool
(LoginChallenge -> LoginChallenge -> Bool)
-> (LoginChallenge -> LoginChallenge -> Bool) -> Eq LoginChallenge
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoginChallenge -> LoginChallenge -> Bool
$c/= :: LoginChallenge -> LoginChallenge -> Bool
== :: LoginChallenge -> LoginChallenge -> Bool
$c== :: LoginChallenge -> LoginChallenge -> Bool
P.Eq, Int -> LoginChallenge -> ShowS
[LoginChallenge] -> ShowS
LoginChallenge -> String
(Int -> LoginChallenge -> ShowS)
-> (LoginChallenge -> String)
-> ([LoginChallenge] -> ShowS)
-> Show LoginChallenge
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoginChallenge] -> ShowS
$cshowList :: [LoginChallenge] -> ShowS
show :: LoginChallenge -> String
$cshow :: LoginChallenge -> String
showsPrec :: Int -> LoginChallenge -> ShowS
$cshowsPrec :: Int -> LoginChallenge -> ShowS
P.Show)
newtype LogoutChallenge = LogoutChallenge { LogoutChallenge -> Text
unLogoutChallenge :: Text } deriving (LogoutChallenge -> LogoutChallenge -> Bool
(LogoutChallenge -> LogoutChallenge -> Bool)
-> (LogoutChallenge -> LogoutChallenge -> Bool)
-> Eq LogoutChallenge
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogoutChallenge -> LogoutChallenge -> Bool
$c/= :: LogoutChallenge -> LogoutChallenge -> Bool
== :: LogoutChallenge -> LogoutChallenge -> Bool
$c== :: LogoutChallenge -> LogoutChallenge -> Bool
P.Eq, Int -> LogoutChallenge -> ShowS
[LogoutChallenge] -> ShowS
LogoutChallenge -> String
(Int -> LogoutChallenge -> ShowS)
-> (LogoutChallenge -> String)
-> ([LogoutChallenge] -> ShowS)
-> Show LogoutChallenge
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogoutChallenge] -> ShowS
$cshowList :: [LogoutChallenge] -> ShowS
show :: LogoutChallenge -> String
$cshow :: LogoutChallenge -> String
showsPrec :: Int -> LogoutChallenge -> ShowS
$cshowsPrec :: Int -> LogoutChallenge -> ShowS
P.Show)
newtype Offset = Offset { Offset -> Integer
unOffset :: Integer } deriving (Offset -> Offset -> Bool
(Offset -> Offset -> Bool)
-> (Offset -> Offset -> Bool) -> Eq Offset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Offset -> Offset -> Bool
$c/= :: Offset -> Offset -> Bool
== :: Offset -> Offset -> Bool
$c== :: Offset -> Offset -> Bool
P.Eq, Int -> Offset -> ShowS
[Offset] -> ShowS
Offset -> String
(Int -> Offset -> ShowS)
-> (Offset -> String) -> ([Offset] -> ShowS) -> Show Offset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Offset] -> ShowS
$cshowList :: [Offset] -> ShowS
show :: Offset -> String
$cshow :: Offset -> String
showsPrec :: Int -> Offset -> ShowS
$cshowsPrec :: Int -> Offset -> ShowS
P.Show)
newtype RedirectUri = RedirectUri { RedirectUri -> Text
unRedirectUri :: Text } deriving (RedirectUri -> RedirectUri -> Bool
(RedirectUri -> RedirectUri -> Bool)
-> (RedirectUri -> RedirectUri -> Bool) -> Eq RedirectUri
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedirectUri -> RedirectUri -> Bool
$c/= :: RedirectUri -> RedirectUri -> Bool
== :: RedirectUri -> RedirectUri -> Bool
$c== :: RedirectUri -> RedirectUri -> Bool
P.Eq, Int -> RedirectUri -> ShowS
[RedirectUri] -> ShowS
RedirectUri -> String
(Int -> RedirectUri -> ShowS)
-> (RedirectUri -> String)
-> ([RedirectUri] -> ShowS)
-> Show RedirectUri
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedirectUri] -> ShowS
$cshowList :: [RedirectUri] -> ShowS
show :: RedirectUri -> String
$cshow :: RedirectUri -> String
showsPrec :: Int -> RedirectUri -> ShowS
$cshowsPrec :: Int -> RedirectUri -> ShowS
P.Show)
newtype RefreshToken = RefreshToken { RefreshToken -> Text
unRefreshToken :: Text } deriving (RefreshToken -> RefreshToken -> Bool
(RefreshToken -> RefreshToken -> Bool)
-> (RefreshToken -> RefreshToken -> Bool) -> Eq RefreshToken
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RefreshToken -> RefreshToken -> Bool
$c/= :: RefreshToken -> RefreshToken -> Bool
== :: RefreshToken -> RefreshToken -> Bool
$c== :: RefreshToken -> RefreshToken -> Bool
P.Eq, Int -> RefreshToken -> ShowS
[RefreshToken] -> ShowS
RefreshToken -> String
(Int -> RefreshToken -> ShowS)
-> (RefreshToken -> String)
-> ([RefreshToken] -> ShowS)
-> Show RefreshToken
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RefreshToken] -> ShowS
$cshowList :: [RefreshToken] -> ShowS
show :: RefreshToken -> String
$cshow :: RefreshToken -> String
showsPrec :: Int -> RefreshToken -> ShowS
$cshowsPrec :: Int -> RefreshToken -> ShowS
P.Show)
newtype Scope = Scope { Scope -> Text
unScope :: Text } deriving (Scope -> Scope -> Bool
(Scope -> Scope -> Bool) -> (Scope -> Scope -> Bool) -> Eq Scope
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Scope -> Scope -> Bool
$c/= :: Scope -> Scope -> Bool
== :: Scope -> Scope -> Bool
$c== :: Scope -> Scope -> Bool
P.Eq, Int -> Scope -> ShowS
[Scope] -> ShowS
Scope -> String
(Int -> Scope -> ShowS)
-> (Scope -> String) -> ([Scope] -> ShowS) -> Show Scope
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Scope] -> ShowS
$cshowList :: [Scope] -> ShowS
show :: Scope -> String
$cshow :: Scope -> String
showsPrec :: Int -> Scope -> ShowS
$cshowsPrec :: Int -> Scope -> ShowS
P.Show)
newtype Set = Set { Set -> Text
unSet :: Text } deriving (Set -> Set -> Bool
(Set -> Set -> Bool) -> (Set -> Set -> Bool) -> Eq Set
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Set -> Set -> Bool
$c/= :: Set -> Set -> Bool
== :: Set -> Set -> Bool
$c== :: Set -> Set -> Bool
P.Eq, Int -> Set -> ShowS
[Set] -> ShowS
Set -> String
(Int -> Set -> ShowS)
-> (Set -> String) -> ([Set] -> ShowS) -> Show Set
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Set] -> ShowS
$cshowList :: [Set] -> ShowS
show :: Set -> String
$cshow :: Set -> String
showsPrec :: Int -> Set -> ShowS
$cshowsPrec :: Int -> Set -> ShowS
P.Show)
newtype Subject = Subject { Subject -> Text
unSubject :: Text } deriving (Subject -> Subject -> Bool
(Subject -> Subject -> Bool)
-> (Subject -> Subject -> Bool) -> Eq Subject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Subject -> Subject -> Bool
$c/= :: Subject -> Subject -> Bool
== :: Subject -> Subject -> Bool
$c== :: Subject -> Subject -> Bool
P.Eq, Int -> Subject -> ShowS
[Subject] -> ShowS
Subject -> String
(Int -> Subject -> ShowS)
-> (Subject -> String) -> ([Subject] -> ShowS) -> Show Subject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Subject] -> ShowS
$cshowList :: [Subject] -> ShowS
show :: Subject -> String
$cshow :: Subject -> String
showsPrec :: Int -> Subject -> ShowS
$cshowsPrec :: Int -> Subject -> ShowS
P.Show)
newtype Token = Token { Token -> Text
unToken :: Text } deriving (Token -> Token -> Bool
(Token -> Token -> Bool) -> (Token -> Token -> Bool) -> Eq Token
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Token -> Token -> Bool
$c/= :: Token -> Token -> Bool
== :: Token -> Token -> Bool
$c== :: Token -> Token -> Bool
P.Eq, Int -> Token -> ShowS
[Token] -> ShowS
Token -> String
(Int -> Token -> ShowS)
-> (Token -> String) -> ([Token] -> ShowS) -> Show Token
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Token] -> ShowS
$cshowList :: [Token] -> ShowS
show :: Token -> String
$cshow :: Token -> String
showsPrec :: Int -> Token -> ShowS
$cshowsPrec :: Int -> Token -> ShowS
P.Show)
data AcceptConsentRequest = AcceptConsentRequest
{ AcceptConsentRequest -> Maybe [Text]
acceptConsentRequestGrantAccessTokenAudience :: Maybe [Text]
, AcceptConsentRequest -> Maybe [Text]
acceptConsentRequestGrantScope :: Maybe [Text]
, AcceptConsentRequest -> Maybe DateTime
acceptConsentRequestHandledAt :: Maybe DateTime
, AcceptConsentRequest -> Maybe Bool
acceptConsentRequestRemember :: Maybe Bool
, AcceptConsentRequest -> Maybe Integer
acceptConsentRequestRememberFor :: Maybe Integer
, AcceptConsentRequest -> Maybe ConsentRequestSession
acceptConsentRequestSession :: Maybe ConsentRequestSession
} deriving (Int -> AcceptConsentRequest -> ShowS
[AcceptConsentRequest] -> ShowS
AcceptConsentRequest -> String
(Int -> AcceptConsentRequest -> ShowS)
-> (AcceptConsentRequest -> String)
-> ([AcceptConsentRequest] -> ShowS)
-> Show AcceptConsentRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcceptConsentRequest] -> ShowS
$cshowList :: [AcceptConsentRequest] -> ShowS
show :: AcceptConsentRequest -> String
$cshow :: AcceptConsentRequest -> String
showsPrec :: Int -> AcceptConsentRequest -> ShowS
$cshowsPrec :: Int -> AcceptConsentRequest -> ShowS
P.Show, AcceptConsentRequest -> AcceptConsentRequest -> Bool
(AcceptConsentRequest -> AcceptConsentRequest -> Bool)
-> (AcceptConsentRequest -> AcceptConsentRequest -> Bool)
-> Eq AcceptConsentRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcceptConsentRequest -> AcceptConsentRequest -> Bool
$c/= :: AcceptConsentRequest -> AcceptConsentRequest -> Bool
== :: AcceptConsentRequest -> AcceptConsentRequest -> Bool
$c== :: AcceptConsentRequest -> AcceptConsentRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON AcceptConsentRequest where
parseJSON :: Value -> Parser AcceptConsentRequest
parseJSON = String
-> (Object -> Parser AcceptConsentRequest)
-> Value
-> Parser AcceptConsentRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"AcceptConsentRequest" ((Object -> Parser AcceptConsentRequest)
-> Value -> Parser AcceptConsentRequest)
-> (Object -> Parser AcceptConsentRequest)
-> Value
-> Parser AcceptConsentRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest
AcceptConsentRequest
(Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grant_access_token_audience")
Parser
(Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
-> Parser (Maybe [Text])
-> Parser
(Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grant_scope")
Parser
(Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
-> Parser (Maybe DateTime)
-> Parser
(Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"handled_at")
Parser
(Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest)
-> Parser (Maybe Bool)
-> Parser
(Maybe Integer
-> Maybe ConsentRequestSession -> AcceptConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remember")
Parser
(Maybe Integer
-> Maybe ConsentRequestSession -> AcceptConsentRequest)
-> Parser (Maybe Integer)
-> Parser (Maybe ConsentRequestSession -> AcceptConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remember_for")
Parser (Maybe ConsentRequestSession -> AcceptConsentRequest)
-> Parser (Maybe ConsentRequestSession)
-> Parser AcceptConsentRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe ConsentRequestSession)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"session")
instance A.ToJSON AcceptConsentRequest where
toJSON :: AcceptConsentRequest -> Value
toJSON AcceptConsentRequest {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe DateTime
Maybe ConsentRequestSession
acceptConsentRequestSession :: Maybe ConsentRequestSession
acceptConsentRequestRememberFor :: Maybe Integer
acceptConsentRequestRemember :: Maybe Bool
acceptConsentRequestHandledAt :: Maybe DateTime
acceptConsentRequestGrantScope :: Maybe [Text]
acceptConsentRequestGrantAccessTokenAudience :: Maybe [Text]
acceptConsentRequestSession :: AcceptConsentRequest -> Maybe ConsentRequestSession
acceptConsentRequestRememberFor :: AcceptConsentRequest -> Maybe Integer
acceptConsentRequestRemember :: AcceptConsentRequest -> Maybe Bool
acceptConsentRequestHandledAt :: AcceptConsentRequest -> Maybe DateTime
acceptConsentRequestGrantScope :: AcceptConsentRequest -> Maybe [Text]
acceptConsentRequestGrantAccessTokenAudience :: AcceptConsentRequest -> Maybe [Text]
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"grant_access_token_audience" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
acceptConsentRequestGrantAccessTokenAudience
, Key
"grant_scope" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
acceptConsentRequestGrantScope
, Key
"handled_at" Key -> Maybe DateTime -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
acceptConsentRequestHandledAt
, Key
"remember" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
acceptConsentRequestRemember
, Key
"remember_for" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
acceptConsentRequestRememberFor
, Key
"session" Key -> Maybe ConsentRequestSession -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe ConsentRequestSession
acceptConsentRequestSession
]
mkAcceptConsentRequest
:: AcceptConsentRequest
mkAcceptConsentRequest :: AcceptConsentRequest
mkAcceptConsentRequest =
AcceptConsentRequest :: Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> AcceptConsentRequest
AcceptConsentRequest
{ acceptConsentRequestGrantAccessTokenAudience :: Maybe [Text]
acceptConsentRequestGrantAccessTokenAudience = Maybe [Text]
forall a. Maybe a
Nothing
, acceptConsentRequestGrantScope :: Maybe [Text]
acceptConsentRequestGrantScope = Maybe [Text]
forall a. Maybe a
Nothing
, acceptConsentRequestHandledAt :: Maybe DateTime
acceptConsentRequestHandledAt = Maybe DateTime
forall a. Maybe a
Nothing
, acceptConsentRequestRemember :: Maybe Bool
acceptConsentRequestRemember = Maybe Bool
forall a. Maybe a
Nothing
, acceptConsentRequestRememberFor :: Maybe Integer
acceptConsentRequestRememberFor = Maybe Integer
forall a. Maybe a
Nothing
, acceptConsentRequestSession :: Maybe ConsentRequestSession
acceptConsentRequestSession = Maybe ConsentRequestSession
forall a. Maybe a
Nothing
}
data AcceptLoginRequest = AcceptLoginRequest
{ AcceptLoginRequest -> Maybe Text
acceptLoginRequestAcr :: Maybe Text
, AcceptLoginRequest -> Maybe Value
acceptLoginRequestContext :: Maybe A.Value
, AcceptLoginRequest -> Maybe Text
acceptLoginRequestForceSubjectIdentifier :: Maybe Text
, AcceptLoginRequest -> Maybe Bool
acceptLoginRequestRemember :: Maybe Bool
, AcceptLoginRequest -> Maybe Integer
acceptLoginRequestRememberFor :: Maybe Integer
, AcceptLoginRequest -> Text
acceptLoginRequestSubject :: Text
} deriving (Int -> AcceptLoginRequest -> ShowS
[AcceptLoginRequest] -> ShowS
AcceptLoginRequest -> String
(Int -> AcceptLoginRequest -> ShowS)
-> (AcceptLoginRequest -> String)
-> ([AcceptLoginRequest] -> ShowS)
-> Show AcceptLoginRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcceptLoginRequest] -> ShowS
$cshowList :: [AcceptLoginRequest] -> ShowS
show :: AcceptLoginRequest -> String
$cshow :: AcceptLoginRequest -> String
showsPrec :: Int -> AcceptLoginRequest -> ShowS
$cshowsPrec :: Int -> AcceptLoginRequest -> ShowS
P.Show, AcceptLoginRequest -> AcceptLoginRequest -> Bool
(AcceptLoginRequest -> AcceptLoginRequest -> Bool)
-> (AcceptLoginRequest -> AcceptLoginRequest -> Bool)
-> Eq AcceptLoginRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcceptLoginRequest -> AcceptLoginRequest -> Bool
$c/= :: AcceptLoginRequest -> AcceptLoginRequest -> Bool
== :: AcceptLoginRequest -> AcceptLoginRequest -> Bool
$c== :: AcceptLoginRequest -> AcceptLoginRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON AcceptLoginRequest where
parseJSON :: Value -> Parser AcceptLoginRequest
parseJSON = String
-> (Object -> Parser AcceptLoginRequest)
-> Value
-> Parser AcceptLoginRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"AcceptLoginRequest" ((Object -> Parser AcceptLoginRequest)
-> Value -> Parser AcceptLoginRequest)
-> (Object -> Parser AcceptLoginRequest)
-> Value
-> Parser AcceptLoginRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Text
-> AcceptLoginRequest
AcceptLoginRequest
(Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Text
-> AcceptLoginRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Value
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Text
-> AcceptLoginRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"acr")
Parser
(Maybe Value
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Text
-> AcceptLoginRequest)
-> Parser (Maybe Value)
-> Parser
(Maybe Text
-> Maybe Bool -> Maybe Integer -> Text -> AcceptLoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"context")
Parser
(Maybe Text
-> Maybe Bool -> Maybe Integer -> Text -> AcceptLoginRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool -> Maybe Integer -> Text -> AcceptLoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"force_subject_identifier")
Parser (Maybe Bool -> Maybe Integer -> Text -> AcceptLoginRequest)
-> Parser (Maybe Bool)
-> Parser (Maybe Integer -> Text -> AcceptLoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remember")
Parser (Maybe Integer -> Text -> AcceptLoginRequest)
-> Parser (Maybe Integer) -> Parser (Text -> AcceptLoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remember_for")
Parser (Text -> AcceptLoginRequest)
-> Parser Text -> Parser AcceptLoginRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"subject")
instance A.ToJSON AcceptLoginRequest where
toJSON :: AcceptLoginRequest -> Value
toJSON AcceptLoginRequest {Maybe Bool
Maybe Integer
Maybe Text
Maybe Value
Text
acceptLoginRequestSubject :: Text
acceptLoginRequestRememberFor :: Maybe Integer
acceptLoginRequestRemember :: Maybe Bool
acceptLoginRequestForceSubjectIdentifier :: Maybe Text
acceptLoginRequestContext :: Maybe Value
acceptLoginRequestAcr :: Maybe Text
acceptLoginRequestSubject :: AcceptLoginRequest -> Text
acceptLoginRequestRememberFor :: AcceptLoginRequest -> Maybe Integer
acceptLoginRequestRemember :: AcceptLoginRequest -> Maybe Bool
acceptLoginRequestForceSubjectIdentifier :: AcceptLoginRequest -> Maybe Text
acceptLoginRequestContext :: AcceptLoginRequest -> Maybe Value
acceptLoginRequestAcr :: AcceptLoginRequest -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"acr" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
acceptLoginRequestAcr
, Key
"context" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
acceptLoginRequestContext
, Key
"force_subject_identifier" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
acceptLoginRequestForceSubjectIdentifier
, Key
"remember" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
acceptLoginRequestRemember
, Key
"remember_for" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
acceptLoginRequestRememberFor
, Key
"subject" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
acceptLoginRequestSubject
]
mkAcceptLoginRequest
:: Text
-> AcceptLoginRequest
mkAcceptLoginRequest :: Text -> AcceptLoginRequest
mkAcceptLoginRequest Text
acceptLoginRequestSubject =
AcceptLoginRequest :: Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Bool
-> Maybe Integer
-> Text
-> AcceptLoginRequest
AcceptLoginRequest
{ acceptLoginRequestAcr :: Maybe Text
acceptLoginRequestAcr = Maybe Text
forall a. Maybe a
Nothing
, acceptLoginRequestContext :: Maybe Value
acceptLoginRequestContext = Maybe Value
forall a. Maybe a
Nothing
, acceptLoginRequestForceSubjectIdentifier :: Maybe Text
acceptLoginRequestForceSubjectIdentifier = Maybe Text
forall a. Maybe a
Nothing
, acceptLoginRequestRemember :: Maybe Bool
acceptLoginRequestRemember = Maybe Bool
forall a. Maybe a
Nothing
, acceptLoginRequestRememberFor :: Maybe Integer
acceptLoginRequestRememberFor = Maybe Integer
forall a. Maybe a
Nothing
, Text
acceptLoginRequestSubject :: Text
acceptLoginRequestSubject :: Text
acceptLoginRequestSubject
}
data CompletedRequest = CompletedRequest
{ CompletedRequest -> Text
completedRequestRedirectTo :: Text
} deriving (Int -> CompletedRequest -> ShowS
[CompletedRequest] -> ShowS
CompletedRequest -> String
(Int -> CompletedRequest -> ShowS)
-> (CompletedRequest -> String)
-> ([CompletedRequest] -> ShowS)
-> Show CompletedRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CompletedRequest] -> ShowS
$cshowList :: [CompletedRequest] -> ShowS
show :: CompletedRequest -> String
$cshow :: CompletedRequest -> String
showsPrec :: Int -> CompletedRequest -> ShowS
$cshowsPrec :: Int -> CompletedRequest -> ShowS
P.Show, CompletedRequest -> CompletedRequest -> Bool
(CompletedRequest -> CompletedRequest -> Bool)
-> (CompletedRequest -> CompletedRequest -> Bool)
-> Eq CompletedRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompletedRequest -> CompletedRequest -> Bool
$c/= :: CompletedRequest -> CompletedRequest -> Bool
== :: CompletedRequest -> CompletedRequest -> Bool
$c== :: CompletedRequest -> CompletedRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON CompletedRequest where
parseJSON :: Value -> Parser CompletedRequest
parseJSON = String
-> (Object -> Parser CompletedRequest)
-> Value
-> Parser CompletedRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"CompletedRequest" ((Object -> Parser CompletedRequest)
-> Value -> Parser CompletedRequest)
-> (Object -> Parser CompletedRequest)
-> Value
-> Parser CompletedRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> CompletedRequest
CompletedRequest
(Text -> CompletedRequest)
-> Parser Text -> Parser CompletedRequest
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"redirect_to")
instance A.ToJSON CompletedRequest where
toJSON :: CompletedRequest -> Value
toJSON CompletedRequest {Text
completedRequestRedirectTo :: Text
completedRequestRedirectTo :: CompletedRequest -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"redirect_to" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
completedRequestRedirectTo
]
mkCompletedRequest
:: Text
-> CompletedRequest
mkCompletedRequest :: Text -> CompletedRequest
mkCompletedRequest Text
completedRequestRedirectTo =
CompletedRequest :: Text -> CompletedRequest
CompletedRequest
{ Text
completedRequestRedirectTo :: Text
completedRequestRedirectTo :: Text
completedRequestRedirectTo
}
data ConsentRequest = ConsentRequest
{ ConsentRequest -> Maybe Text
consentRequestAcr :: Maybe Text
, ConsentRequest -> Text
consentRequestChallenge :: Text
, ConsentRequest -> Maybe OAuth2Client
consentRequestClient :: Maybe OAuth2Client
, ConsentRequest -> Maybe Value
consentRequestContext :: Maybe A.Value
, ConsentRequest -> Maybe Text
consentRequestLoginChallenge :: Maybe Text
, ConsentRequest -> Maybe Text
consentRequestLoginSessionId :: Maybe Text
, ConsentRequest -> Maybe OpenIDConnectContext
consentRequestOidcContext :: Maybe OpenIDConnectContext
, ConsentRequest -> Maybe Text
consentRequestRequestUrl :: Maybe Text
, ConsentRequest -> Maybe [Text]
consentRequestRequestedAccessTokenAudience :: Maybe [Text]
, ConsentRequest -> Maybe [Text]
consentRequestRequestedScope :: Maybe [Text]
, ConsentRequest -> Maybe Bool
consentRequestSkip :: Maybe Bool
, ConsentRequest -> Maybe Text
consentRequestSubject :: Maybe Text
} deriving (Int -> ConsentRequest -> ShowS
[ConsentRequest] -> ShowS
ConsentRequest -> String
(Int -> ConsentRequest -> ShowS)
-> (ConsentRequest -> String)
-> ([ConsentRequest] -> ShowS)
-> Show ConsentRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConsentRequest] -> ShowS
$cshowList :: [ConsentRequest] -> ShowS
show :: ConsentRequest -> String
$cshow :: ConsentRequest -> String
showsPrec :: Int -> ConsentRequest -> ShowS
$cshowsPrec :: Int -> ConsentRequest -> ShowS
P.Show, ConsentRequest -> ConsentRequest -> Bool
(ConsentRequest -> ConsentRequest -> Bool)
-> (ConsentRequest -> ConsentRequest -> Bool) -> Eq ConsentRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsentRequest -> ConsentRequest -> Bool
$c/= :: ConsentRequest -> ConsentRequest -> Bool
== :: ConsentRequest -> ConsentRequest -> Bool
$c== :: ConsentRequest -> ConsentRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON ConsentRequest where
parseJSON :: Value -> Parser ConsentRequest
parseJSON = String
-> (Object -> Parser ConsentRequest)
-> Value
-> Parser ConsentRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"ConsentRequest" ((Object -> Parser ConsentRequest)
-> Value -> Parser ConsentRequest)
-> (Object -> Parser ConsentRequest)
-> Value
-> Parser ConsentRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Text
-> Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest
ConsentRequest
(Maybe Text
-> Text
-> Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe Text)
-> Parser
(Text
-> Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"acr")
Parser
(Text
-> Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser Text
-> Parser
(Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"challenge")
Parser
(Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe OAuth2Client)
-> Parser
(Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe OAuth2Client)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client")
Parser
(Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe Value)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"context")
Parser
(Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"login_challenge")
Parser
(Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"login_session_id")
Parser
(Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe OpenIDConnectContext)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe OpenIDConnectContext)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"oidc_context")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe [Text] -> Maybe Bool -> Maybe Text -> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_url")
Parser
(Maybe [Text]
-> Maybe [Text] -> Maybe Bool -> Maybe Text -> ConsentRequest)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text] -> Maybe Bool -> Maybe Text -> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requested_access_token_audience")
Parser (Maybe [Text] -> Maybe Bool -> Maybe Text -> ConsentRequest)
-> Parser (Maybe [Text])
-> Parser (Maybe Bool -> Maybe Text -> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"requested_scope")
Parser (Maybe Bool -> Maybe Text -> ConsentRequest)
-> Parser (Maybe Bool) -> Parser (Maybe Text -> ConsentRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"skip")
Parser (Maybe Text -> ConsentRequest)
-> Parser (Maybe Text) -> Parser ConsentRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subject")
instance A.ToJSON ConsentRequest where
toJSON :: ConsentRequest -> Value
toJSON ConsentRequest {Maybe Bool
Maybe [Text]
Maybe Text
Maybe Value
Maybe OpenIDConnectContext
Maybe OAuth2Client
Text
consentRequestSubject :: Maybe Text
consentRequestSkip :: Maybe Bool
consentRequestRequestedScope :: Maybe [Text]
consentRequestRequestedAccessTokenAudience :: Maybe [Text]
consentRequestRequestUrl :: Maybe Text
consentRequestOidcContext :: Maybe OpenIDConnectContext
consentRequestLoginSessionId :: Maybe Text
consentRequestLoginChallenge :: Maybe Text
consentRequestContext :: Maybe Value
consentRequestClient :: Maybe OAuth2Client
consentRequestChallenge :: Text
consentRequestAcr :: Maybe Text
consentRequestSubject :: ConsentRequest -> Maybe Text
consentRequestSkip :: ConsentRequest -> Maybe Bool
consentRequestRequestedScope :: ConsentRequest -> Maybe [Text]
consentRequestRequestedAccessTokenAudience :: ConsentRequest -> Maybe [Text]
consentRequestRequestUrl :: ConsentRequest -> Maybe Text
consentRequestOidcContext :: ConsentRequest -> Maybe OpenIDConnectContext
consentRequestLoginSessionId :: ConsentRequest -> Maybe Text
consentRequestLoginChallenge :: ConsentRequest -> Maybe Text
consentRequestContext :: ConsentRequest -> Maybe Value
consentRequestClient :: ConsentRequest -> Maybe OAuth2Client
consentRequestChallenge :: ConsentRequest -> Text
consentRequestAcr :: ConsentRequest -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"acr" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
consentRequestAcr
, Key
"challenge" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
consentRequestChallenge
, Key
"client" Key -> Maybe OAuth2Client -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe OAuth2Client
consentRequestClient
, Key
"context" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
consentRequestContext
, Key
"login_challenge" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
consentRequestLoginChallenge
, Key
"login_session_id" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
consentRequestLoginSessionId
, Key
"oidc_context" Key -> Maybe OpenIDConnectContext -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe OpenIDConnectContext
consentRequestOidcContext
, Key
"request_url" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
consentRequestRequestUrl
, Key
"requested_access_token_audience" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
consentRequestRequestedAccessTokenAudience
, Key
"requested_scope" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
consentRequestRequestedScope
, Key
"skip" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
consentRequestSkip
, Key
"subject" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
consentRequestSubject
]
mkConsentRequest
:: Text
-> ConsentRequest
mkConsentRequest :: Text -> ConsentRequest
mkConsentRequest Text
consentRequestChallenge =
ConsentRequest :: Maybe Text
-> Text
-> Maybe OAuth2Client
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe OpenIDConnectContext
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> ConsentRequest
ConsentRequest
{ consentRequestAcr :: Maybe Text
consentRequestAcr = Maybe Text
forall a. Maybe a
Nothing
, Text
consentRequestChallenge :: Text
consentRequestChallenge :: Text
consentRequestChallenge
, consentRequestClient :: Maybe OAuth2Client
consentRequestClient = Maybe OAuth2Client
forall a. Maybe a
Nothing
, consentRequestContext :: Maybe Value
consentRequestContext = Maybe Value
forall a. Maybe a
Nothing
, consentRequestLoginChallenge :: Maybe Text
consentRequestLoginChallenge = Maybe Text
forall a. Maybe a
Nothing
, consentRequestLoginSessionId :: Maybe Text
consentRequestLoginSessionId = Maybe Text
forall a. Maybe a
Nothing
, consentRequestOidcContext :: Maybe OpenIDConnectContext
consentRequestOidcContext = Maybe OpenIDConnectContext
forall a. Maybe a
Nothing
, consentRequestRequestUrl :: Maybe Text
consentRequestRequestUrl = Maybe Text
forall a. Maybe a
Nothing
, consentRequestRequestedAccessTokenAudience :: Maybe [Text]
consentRequestRequestedAccessTokenAudience = Maybe [Text]
forall a. Maybe a
Nothing
, consentRequestRequestedScope :: Maybe [Text]
consentRequestRequestedScope = Maybe [Text]
forall a. Maybe a
Nothing
, consentRequestSkip :: Maybe Bool
consentRequestSkip = Maybe Bool
forall a. Maybe a
Nothing
, consentRequestSubject :: Maybe Text
consentRequestSubject = Maybe Text
forall a. Maybe a
Nothing
}
data ConsentRequestSession = ConsentRequestSession
{ ConsentRequestSession -> Maybe Value
consentRequestSessionAccessToken :: Maybe A.Value
, ConsentRequestSession -> Maybe Value
consentRequestSessionIdToken :: Maybe A.Value
} deriving (Int -> ConsentRequestSession -> ShowS
[ConsentRequestSession] -> ShowS
ConsentRequestSession -> String
(Int -> ConsentRequestSession -> ShowS)
-> (ConsentRequestSession -> String)
-> ([ConsentRequestSession] -> ShowS)
-> Show ConsentRequestSession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConsentRequestSession] -> ShowS
$cshowList :: [ConsentRequestSession] -> ShowS
show :: ConsentRequestSession -> String
$cshow :: ConsentRequestSession -> String
showsPrec :: Int -> ConsentRequestSession -> ShowS
$cshowsPrec :: Int -> ConsentRequestSession -> ShowS
P.Show, ConsentRequestSession -> ConsentRequestSession -> Bool
(ConsentRequestSession -> ConsentRequestSession -> Bool)
-> (ConsentRequestSession -> ConsentRequestSession -> Bool)
-> Eq ConsentRequestSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsentRequestSession -> ConsentRequestSession -> Bool
$c/= :: ConsentRequestSession -> ConsentRequestSession -> Bool
== :: ConsentRequestSession -> ConsentRequestSession -> Bool
$c== :: ConsentRequestSession -> ConsentRequestSession -> Bool
P.Eq, P.Typeable)
instance A.FromJSON ConsentRequestSession where
parseJSON :: Value -> Parser ConsentRequestSession
parseJSON = String
-> (Object -> Parser ConsentRequestSession)
-> Value
-> Parser ConsentRequestSession
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"ConsentRequestSession" ((Object -> Parser ConsentRequestSession)
-> Value -> Parser ConsentRequestSession)
-> (Object -> Parser ConsentRequestSession)
-> Value
-> Parser ConsentRequestSession
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Value -> Maybe Value -> ConsentRequestSession
ConsentRequestSession
(Maybe Value -> Maybe Value -> ConsentRequestSession)
-> Parser (Maybe Value)
-> Parser (Maybe Value -> ConsentRequestSession)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"access_token")
Parser (Maybe Value -> ConsentRequestSession)
-> Parser (Maybe Value) -> Parser ConsentRequestSession
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"id_token")
instance A.ToJSON ConsentRequestSession where
toJSON :: ConsentRequestSession -> Value
toJSON ConsentRequestSession {Maybe Value
consentRequestSessionIdToken :: Maybe Value
consentRequestSessionAccessToken :: Maybe Value
consentRequestSessionIdToken :: ConsentRequestSession -> Maybe Value
consentRequestSessionAccessToken :: ConsentRequestSession -> Maybe Value
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"access_token" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
consentRequestSessionAccessToken
, Key
"id_token" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
consentRequestSessionIdToken
]
mkConsentRequestSession
:: ConsentRequestSession
mkConsentRequestSession :: ConsentRequestSession
mkConsentRequestSession =
ConsentRequestSession :: Maybe Value -> Maybe Value -> ConsentRequestSession
ConsentRequestSession
{ consentRequestSessionAccessToken :: Maybe Value
consentRequestSessionAccessToken = Maybe Value
forall a. Maybe a
Nothing
, consentRequestSessionIdToken :: Maybe Value
consentRequestSessionIdToken = Maybe Value
forall a. Maybe a
Nothing
}
data ContainerWaitOKBodyError = ContainerWaitOKBodyError
{ ContainerWaitOKBodyError -> Maybe Text
containerWaitOKBodyErrorMessage :: Maybe Text
} deriving (Int -> ContainerWaitOKBodyError -> ShowS
[ContainerWaitOKBodyError] -> ShowS
ContainerWaitOKBodyError -> String
(Int -> ContainerWaitOKBodyError -> ShowS)
-> (ContainerWaitOKBodyError -> String)
-> ([ContainerWaitOKBodyError] -> ShowS)
-> Show ContainerWaitOKBodyError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerWaitOKBodyError] -> ShowS
$cshowList :: [ContainerWaitOKBodyError] -> ShowS
show :: ContainerWaitOKBodyError -> String
$cshow :: ContainerWaitOKBodyError -> String
showsPrec :: Int -> ContainerWaitOKBodyError -> ShowS
$cshowsPrec :: Int -> ContainerWaitOKBodyError -> ShowS
P.Show, ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool
(ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool)
-> (ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool)
-> Eq ContainerWaitOKBodyError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool
$c/= :: ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool
== :: ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool
$c== :: ContainerWaitOKBodyError -> ContainerWaitOKBodyError -> Bool
P.Eq, P.Typeable)
instance A.FromJSON ContainerWaitOKBodyError where
parseJSON :: Value -> Parser ContainerWaitOKBodyError
parseJSON = String
-> (Object -> Parser ContainerWaitOKBodyError)
-> Value
-> Parser ContainerWaitOKBodyError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"ContainerWaitOKBodyError" ((Object -> Parser ContainerWaitOKBodyError)
-> Value -> Parser ContainerWaitOKBodyError)
-> (Object -> Parser ContainerWaitOKBodyError)
-> Value
-> Parser ContainerWaitOKBodyError
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text -> ContainerWaitOKBodyError
ContainerWaitOKBodyError
(Maybe Text -> ContainerWaitOKBodyError)
-> Parser (Maybe Text) -> Parser ContainerWaitOKBodyError
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"Message")
instance A.ToJSON ContainerWaitOKBodyError where
toJSON :: ContainerWaitOKBodyError -> Value
toJSON ContainerWaitOKBodyError {Maybe Text
containerWaitOKBodyErrorMessage :: Maybe Text
containerWaitOKBodyErrorMessage :: ContainerWaitOKBodyError -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Message" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
containerWaitOKBodyErrorMessage
]
mkContainerWaitOKBodyError
:: ContainerWaitOKBodyError
mkContainerWaitOKBodyError :: ContainerWaitOKBodyError
mkContainerWaitOKBodyError =
ContainerWaitOKBodyError :: Maybe Text -> ContainerWaitOKBodyError
ContainerWaitOKBodyError
{ containerWaitOKBodyErrorMessage :: Maybe Text
containerWaitOKBodyErrorMessage = Maybe Text
forall a. Maybe a
Nothing
}
data FlushInactiveOAuth2TokensRequest = FlushInactiveOAuth2TokensRequest
{ FlushInactiveOAuth2TokensRequest -> Maybe DateTime
flushInactiveOAuth2TokensRequestNotAfter :: Maybe DateTime
} deriving (Int -> FlushInactiveOAuth2TokensRequest -> ShowS
[FlushInactiveOAuth2TokensRequest] -> ShowS
FlushInactiveOAuth2TokensRequest -> String
(Int -> FlushInactiveOAuth2TokensRequest -> ShowS)
-> (FlushInactiveOAuth2TokensRequest -> String)
-> ([FlushInactiveOAuth2TokensRequest] -> ShowS)
-> Show FlushInactiveOAuth2TokensRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FlushInactiveOAuth2TokensRequest] -> ShowS
$cshowList :: [FlushInactiveOAuth2TokensRequest] -> ShowS
show :: FlushInactiveOAuth2TokensRequest -> String
$cshow :: FlushInactiveOAuth2TokensRequest -> String
showsPrec :: Int -> FlushInactiveOAuth2TokensRequest -> ShowS
$cshowsPrec :: Int -> FlushInactiveOAuth2TokensRequest -> ShowS
P.Show, FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool
(FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool)
-> (FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool)
-> Eq FlushInactiveOAuth2TokensRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool
$c/= :: FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool
== :: FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool
$c== :: FlushInactiveOAuth2TokensRequest
-> FlushInactiveOAuth2TokensRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON FlushInactiveOAuth2TokensRequest where
parseJSON :: Value -> Parser FlushInactiveOAuth2TokensRequest
parseJSON = String
-> (Object -> Parser FlushInactiveOAuth2TokensRequest)
-> Value
-> Parser FlushInactiveOAuth2TokensRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"FlushInactiveOAuth2TokensRequest" ((Object -> Parser FlushInactiveOAuth2TokensRequest)
-> Value -> Parser FlushInactiveOAuth2TokensRequest)
-> (Object -> Parser FlushInactiveOAuth2TokensRequest)
-> Value
-> Parser FlushInactiveOAuth2TokensRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe DateTime -> FlushInactiveOAuth2TokensRequest
FlushInactiveOAuth2TokensRequest
(Maybe DateTime -> FlushInactiveOAuth2TokensRequest)
-> Parser (Maybe DateTime)
-> Parser FlushInactiveOAuth2TokensRequest
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"notAfter")
instance A.ToJSON FlushInactiveOAuth2TokensRequest where
toJSON :: FlushInactiveOAuth2TokensRequest -> Value
toJSON FlushInactiveOAuth2TokensRequest {Maybe DateTime
flushInactiveOAuth2TokensRequestNotAfter :: Maybe DateTime
flushInactiveOAuth2TokensRequestNotAfter :: FlushInactiveOAuth2TokensRequest -> Maybe DateTime
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"notAfter" Key -> Maybe DateTime -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
flushInactiveOAuth2TokensRequestNotAfter
]
mkFlushInactiveOAuth2TokensRequest
:: FlushInactiveOAuth2TokensRequest
mkFlushInactiveOAuth2TokensRequest :: FlushInactiveOAuth2TokensRequest
mkFlushInactiveOAuth2TokensRequest =
FlushInactiveOAuth2TokensRequest :: Maybe DateTime -> FlushInactiveOAuth2TokensRequest
FlushInactiveOAuth2TokensRequest
{ flushInactiveOAuth2TokensRequestNotAfter :: Maybe DateTime
flushInactiveOAuth2TokensRequestNotAfter = Maybe DateTime
forall a. Maybe a
Nothing
}
data GenericError = GenericError
{ GenericError -> Maybe Text
genericErrorDebug :: Maybe Text
, GenericError -> Text
genericErrorError :: Text
, GenericError -> Maybe Text
genericErrorErrorDescription :: Maybe Text
, GenericError -> Maybe Integer
genericErrorStatusCode :: Maybe Integer
} deriving (Int -> GenericError -> ShowS
[GenericError] -> ShowS
GenericError -> String
(Int -> GenericError -> ShowS)
-> (GenericError -> String)
-> ([GenericError] -> ShowS)
-> Show GenericError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GenericError] -> ShowS
$cshowList :: [GenericError] -> ShowS
show :: GenericError -> String
$cshow :: GenericError -> String
showsPrec :: Int -> GenericError -> ShowS
$cshowsPrec :: Int -> GenericError -> ShowS
P.Show, GenericError -> GenericError -> Bool
(GenericError -> GenericError -> Bool)
-> (GenericError -> GenericError -> Bool) -> Eq GenericError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GenericError -> GenericError -> Bool
$c/= :: GenericError -> GenericError -> Bool
== :: GenericError -> GenericError -> Bool
$c== :: GenericError -> GenericError -> Bool
P.Eq, P.Typeable)
instance A.FromJSON GenericError where
parseJSON :: Value -> Parser GenericError
parseJSON = String
-> (Object -> Parser GenericError) -> Value -> Parser GenericError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"GenericError" ((Object -> Parser GenericError) -> Value -> Parser GenericError)
-> (Object -> Parser GenericError) -> Value -> Parser GenericError
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text -> Text -> Maybe Text -> Maybe Integer -> GenericError
GenericError
(Maybe Text -> Text -> Maybe Text -> Maybe Integer -> GenericError)
-> Parser (Maybe Text)
-> Parser (Text -> Maybe Text -> Maybe Integer -> GenericError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"debug")
Parser (Text -> Maybe Text -> Maybe Integer -> GenericError)
-> Parser Text
-> Parser (Maybe Text -> Maybe Integer -> GenericError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"error")
Parser (Maybe Text -> Maybe Integer -> GenericError)
-> Parser (Maybe Text) -> Parser (Maybe Integer -> GenericError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error_description")
Parser (Maybe Integer -> GenericError)
-> Parser (Maybe Integer) -> Parser GenericError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status_code")
instance A.ToJSON GenericError where
toJSON :: GenericError -> Value
toJSON GenericError {Maybe Integer
Maybe Text
Text
genericErrorStatusCode :: Maybe Integer
genericErrorErrorDescription :: Maybe Text
genericErrorError :: Text
genericErrorDebug :: Maybe Text
genericErrorStatusCode :: GenericError -> Maybe Integer
genericErrorErrorDescription :: GenericError -> Maybe Text
genericErrorError :: GenericError -> Text
genericErrorDebug :: GenericError -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"debug" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
genericErrorDebug
, Key
"error" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
genericErrorError
, Key
"error_description" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
genericErrorErrorDescription
, Key
"status_code" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
genericErrorStatusCode
]
mkGenericError
:: Text
-> GenericError
mkGenericError :: Text -> GenericError
mkGenericError Text
genericErrorError =
GenericError :: Maybe Text -> Text -> Maybe Text -> Maybe Integer -> GenericError
GenericError
{ genericErrorDebug :: Maybe Text
genericErrorDebug = Maybe Text
forall a. Maybe a
Nothing
, Text
genericErrorError :: Text
genericErrorError :: Text
genericErrorError
, genericErrorErrorDescription :: Maybe Text
genericErrorErrorDescription = Maybe Text
forall a. Maybe a
Nothing
, genericErrorStatusCode :: Maybe Integer
genericErrorStatusCode = Maybe Integer
forall a. Maybe a
Nothing
}
data HealthNotReadyStatus = HealthNotReadyStatus
{ HealthNotReadyStatus -> Maybe (Map String Text)
healthNotReadyStatusErrors :: Maybe (Map.Map String Text)
} deriving (Int -> HealthNotReadyStatus -> ShowS
[HealthNotReadyStatus] -> ShowS
HealthNotReadyStatus -> String
(Int -> HealthNotReadyStatus -> ShowS)
-> (HealthNotReadyStatus -> String)
-> ([HealthNotReadyStatus] -> ShowS)
-> Show HealthNotReadyStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HealthNotReadyStatus] -> ShowS
$cshowList :: [HealthNotReadyStatus] -> ShowS
show :: HealthNotReadyStatus -> String
$cshow :: HealthNotReadyStatus -> String
showsPrec :: Int -> HealthNotReadyStatus -> ShowS
$cshowsPrec :: Int -> HealthNotReadyStatus -> ShowS
P.Show, HealthNotReadyStatus -> HealthNotReadyStatus -> Bool
(HealthNotReadyStatus -> HealthNotReadyStatus -> Bool)
-> (HealthNotReadyStatus -> HealthNotReadyStatus -> Bool)
-> Eq HealthNotReadyStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HealthNotReadyStatus -> HealthNotReadyStatus -> Bool
$c/= :: HealthNotReadyStatus -> HealthNotReadyStatus -> Bool
== :: HealthNotReadyStatus -> HealthNotReadyStatus -> Bool
$c== :: HealthNotReadyStatus -> HealthNotReadyStatus -> Bool
P.Eq, P.Typeable)
instance A.FromJSON HealthNotReadyStatus where
parseJSON :: Value -> Parser HealthNotReadyStatus
parseJSON = String
-> (Object -> Parser HealthNotReadyStatus)
-> Value
-> Parser HealthNotReadyStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"HealthNotReadyStatus" ((Object -> Parser HealthNotReadyStatus)
-> Value -> Parser HealthNotReadyStatus)
-> (Object -> Parser HealthNotReadyStatus)
-> Value
-> Parser HealthNotReadyStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe (Map String Text) -> HealthNotReadyStatus
HealthNotReadyStatus
(Maybe (Map String Text) -> HealthNotReadyStatus)
-> Parser (Maybe (Map String Text)) -> Parser HealthNotReadyStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe (Map String Text))
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"errors")
instance A.ToJSON HealthNotReadyStatus where
toJSON :: HealthNotReadyStatus -> Value
toJSON HealthNotReadyStatus {Maybe (Map String Text)
healthNotReadyStatusErrors :: Maybe (Map String Text)
healthNotReadyStatusErrors :: HealthNotReadyStatus -> Maybe (Map String Text)
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"errors" Key -> Maybe (Map String Text) -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe (Map String Text)
healthNotReadyStatusErrors
]
mkHealthNotReadyStatus
:: HealthNotReadyStatus
mkHealthNotReadyStatus :: HealthNotReadyStatus
mkHealthNotReadyStatus =
HealthNotReadyStatus :: Maybe (Map String Text) -> HealthNotReadyStatus
HealthNotReadyStatus
{ healthNotReadyStatusErrors :: Maybe (Map String Text)
healthNotReadyStatusErrors = Maybe (Map String Text)
forall a. Maybe a
Nothing
}
data HealthStatus = HealthStatus
{ HealthStatus -> Maybe Text
healthStatusStatus :: Maybe Text
} deriving (Int -> HealthStatus -> ShowS
[HealthStatus] -> ShowS
HealthStatus -> String
(Int -> HealthStatus -> ShowS)
-> (HealthStatus -> String)
-> ([HealthStatus] -> ShowS)
-> Show HealthStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HealthStatus] -> ShowS
$cshowList :: [HealthStatus] -> ShowS
show :: HealthStatus -> String
$cshow :: HealthStatus -> String
showsPrec :: Int -> HealthStatus -> ShowS
$cshowsPrec :: Int -> HealthStatus -> ShowS
P.Show, HealthStatus -> HealthStatus -> Bool
(HealthStatus -> HealthStatus -> Bool)
-> (HealthStatus -> HealthStatus -> Bool) -> Eq HealthStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HealthStatus -> HealthStatus -> Bool
$c/= :: HealthStatus -> HealthStatus -> Bool
== :: HealthStatus -> HealthStatus -> Bool
$c== :: HealthStatus -> HealthStatus -> Bool
P.Eq, P.Typeable)
instance A.FromJSON HealthStatus where
parseJSON :: Value -> Parser HealthStatus
parseJSON = String
-> (Object -> Parser HealthStatus) -> Value -> Parser HealthStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"HealthStatus" ((Object -> Parser HealthStatus) -> Value -> Parser HealthStatus)
-> (Object -> Parser HealthStatus) -> Value -> Parser HealthStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text -> HealthStatus
HealthStatus
(Maybe Text -> HealthStatus)
-> Parser (Maybe Text) -> Parser HealthStatus
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status")
instance A.ToJSON HealthStatus where
toJSON :: HealthStatus -> Value
toJSON HealthStatus {Maybe Text
healthStatusStatus :: Maybe Text
healthStatusStatus :: HealthStatus -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"status" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
healthStatusStatus
]
mkHealthStatus
:: HealthStatus
mkHealthStatus :: HealthStatus
mkHealthStatus =
HealthStatus :: Maybe Text -> HealthStatus
HealthStatus
{ healthStatusStatus :: Maybe Text
healthStatusStatus = Maybe Text
forall a. Maybe a
Nothing
}
data JSONWebKey = JSONWebKey
{ JSONWebKey -> Text
jSONWebKeyAlg :: Text
, JSONWebKey -> Maybe Text
jSONWebKeyCrv :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyD :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyDp :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyDq :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyE :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyK :: Maybe Text
, JSONWebKey -> Text
jSONWebKeyKid :: Text
, JSONWebKey -> Text
jSONWebKeyKty :: Text
, JSONWebKey -> Maybe Text
jSONWebKeyN :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyP :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyQ :: Maybe Text
, JSONWebKey -> Maybe Text
jSONWebKeyQi :: Maybe Text
, JSONWebKey -> Text
jSONWebKeyUse :: Text
, JSONWebKey -> Maybe Text
jSONWebKeyX :: Maybe Text
, JSONWebKey -> Maybe [Text]
jSONWebKeyX5c :: Maybe [Text]
, JSONWebKey -> Maybe Text
jSONWebKeyY :: Maybe Text
} deriving (Int -> JSONWebKey -> ShowS
[JSONWebKey] -> ShowS
JSONWebKey -> String
(Int -> JSONWebKey -> ShowS)
-> (JSONWebKey -> String)
-> ([JSONWebKey] -> ShowS)
-> Show JSONWebKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JSONWebKey] -> ShowS
$cshowList :: [JSONWebKey] -> ShowS
show :: JSONWebKey -> String
$cshow :: JSONWebKey -> String
showsPrec :: Int -> JSONWebKey -> ShowS
$cshowsPrec :: Int -> JSONWebKey -> ShowS
P.Show, JSONWebKey -> JSONWebKey -> Bool
(JSONWebKey -> JSONWebKey -> Bool)
-> (JSONWebKey -> JSONWebKey -> Bool) -> Eq JSONWebKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JSONWebKey -> JSONWebKey -> Bool
$c/= :: JSONWebKey -> JSONWebKey -> Bool
== :: JSONWebKey -> JSONWebKey -> Bool
$c== :: JSONWebKey -> JSONWebKey -> Bool
P.Eq, P.Typeable)
instance A.FromJSON JSONWebKey where
parseJSON :: Value -> Parser JSONWebKey
parseJSON = String
-> (Object -> Parser JSONWebKey) -> Value -> Parser JSONWebKey
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"JSONWebKey" ((Object -> Parser JSONWebKey) -> Value -> Parser JSONWebKey)
-> (Object -> Parser JSONWebKey) -> Value -> Parser JSONWebKey
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey
JSONWebKey
(Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"alg")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"crv")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"d")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dp")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"dq")
Parser
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"e")
Parser
(Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"k")
Parser
(Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser Text
-> Parser
(Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"kid")
Parser
(Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"kty")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"n")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"p")
Parser
(Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text -> Maybe Text -> Maybe [Text] -> Maybe Text -> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"q")
Parser
(Maybe Text
-> Text -> Maybe Text -> Maybe [Text] -> Maybe Text -> JSONWebKey)
-> Parser (Maybe Text)
-> Parser
(Text -> Maybe Text -> Maybe [Text] -> Maybe Text -> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"qi")
Parser
(Text -> Maybe Text -> Maybe [Text] -> Maybe Text -> JSONWebKey)
-> Parser Text
-> Parser (Maybe Text -> Maybe [Text] -> Maybe Text -> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"use")
Parser (Maybe Text -> Maybe [Text] -> Maybe Text -> JSONWebKey)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> Maybe Text -> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x")
Parser (Maybe [Text] -> Maybe Text -> JSONWebKey)
-> Parser (Maybe [Text]) -> Parser (Maybe Text -> JSONWebKey)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"x5c")
Parser (Maybe Text -> JSONWebKey)
-> Parser (Maybe Text) -> Parser JSONWebKey
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"y")
instance A.ToJSON JSONWebKey where
toJSON :: JSONWebKey -> Value
toJSON JSONWebKey {Maybe [Text]
Maybe Text
Text
jSONWebKeyY :: Maybe Text
jSONWebKeyX5c :: Maybe [Text]
jSONWebKeyX :: Maybe Text
jSONWebKeyUse :: Text
jSONWebKeyQi :: Maybe Text
jSONWebKeyQ :: Maybe Text
jSONWebKeyP :: Maybe Text
jSONWebKeyN :: Maybe Text
jSONWebKeyKty :: Text
jSONWebKeyKid :: Text
jSONWebKeyK :: Maybe Text
jSONWebKeyE :: Maybe Text
jSONWebKeyDq :: Maybe Text
jSONWebKeyDp :: Maybe Text
jSONWebKeyD :: Maybe Text
jSONWebKeyCrv :: Maybe Text
jSONWebKeyAlg :: Text
jSONWebKeyY :: JSONWebKey -> Maybe Text
jSONWebKeyX5c :: JSONWebKey -> Maybe [Text]
jSONWebKeyX :: JSONWebKey -> Maybe Text
jSONWebKeyUse :: JSONWebKey -> Text
jSONWebKeyQi :: JSONWebKey -> Maybe Text
jSONWebKeyQ :: JSONWebKey -> Maybe Text
jSONWebKeyP :: JSONWebKey -> Maybe Text
jSONWebKeyN :: JSONWebKey -> Maybe Text
jSONWebKeyKty :: JSONWebKey -> Text
jSONWebKeyKid :: JSONWebKey -> Text
jSONWebKeyK :: JSONWebKey -> Maybe Text
jSONWebKeyE :: JSONWebKey -> Maybe Text
jSONWebKeyDq :: JSONWebKey -> Maybe Text
jSONWebKeyDp :: JSONWebKey -> Maybe Text
jSONWebKeyD :: JSONWebKey -> Maybe Text
jSONWebKeyCrv :: JSONWebKey -> Maybe Text
jSONWebKeyAlg :: JSONWebKey -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"alg" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jSONWebKeyAlg
, Key
"crv" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyCrv
, Key
"d" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyD
, Key
"dp" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyDp
, Key
"dq" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyDq
, Key
"e" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyE
, Key
"k" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyK
, Key
"kid" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jSONWebKeyKid
, Key
"kty" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jSONWebKeyKty
, Key
"n" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyN
, Key
"p" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyP
, Key
"q" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyQ
, Key
"qi" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyQi
, Key
"use" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jSONWebKeyUse
, Key
"x" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyX
, Key
"x5c" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
jSONWebKeyX5c
, Key
"y" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
jSONWebKeyY
]
mkJSONWebKey
:: Text
-> Text
-> Text
-> Text
-> JSONWebKey
mkJSONWebKey :: Text -> Text -> Text -> Text -> JSONWebKey
mkJSONWebKey Text
jSONWebKeyAlg Text
jSONWebKeyKid Text
jSONWebKeyKty Text
jSONWebKeyUse =
JSONWebKey :: Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> JSONWebKey
JSONWebKey
{ Text
jSONWebKeyAlg :: Text
jSONWebKeyAlg :: Text
jSONWebKeyAlg
, jSONWebKeyCrv :: Maybe Text
jSONWebKeyCrv = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyD :: Maybe Text
jSONWebKeyD = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyDp :: Maybe Text
jSONWebKeyDp = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyDq :: Maybe Text
jSONWebKeyDq = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyE :: Maybe Text
jSONWebKeyE = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyK :: Maybe Text
jSONWebKeyK = Maybe Text
forall a. Maybe a
Nothing
, Text
jSONWebKeyKid :: Text
jSONWebKeyKid :: Text
jSONWebKeyKid
, Text
jSONWebKeyKty :: Text
jSONWebKeyKty :: Text
jSONWebKeyKty
, jSONWebKeyN :: Maybe Text
jSONWebKeyN = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyP :: Maybe Text
jSONWebKeyP = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyQ :: Maybe Text
jSONWebKeyQ = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyQi :: Maybe Text
jSONWebKeyQi = Maybe Text
forall a. Maybe a
Nothing
, Text
jSONWebKeyUse :: Text
jSONWebKeyUse :: Text
jSONWebKeyUse
, jSONWebKeyX :: Maybe Text
jSONWebKeyX = Maybe Text
forall a. Maybe a
Nothing
, jSONWebKeyX5c :: Maybe [Text]
jSONWebKeyX5c = Maybe [Text]
forall a. Maybe a
Nothing
, jSONWebKeyY :: Maybe Text
jSONWebKeyY = Maybe Text
forall a. Maybe a
Nothing
}
data JSONWebKeySet = JSONWebKeySet
{ JSONWebKeySet -> Maybe [JSONWebKey]
jSONWebKeySetKeys :: Maybe [JSONWebKey]
} deriving (Int -> JSONWebKeySet -> ShowS
[JSONWebKeySet] -> ShowS
JSONWebKeySet -> String
(Int -> JSONWebKeySet -> ShowS)
-> (JSONWebKeySet -> String)
-> ([JSONWebKeySet] -> ShowS)
-> Show JSONWebKeySet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JSONWebKeySet] -> ShowS
$cshowList :: [JSONWebKeySet] -> ShowS
show :: JSONWebKeySet -> String
$cshow :: JSONWebKeySet -> String
showsPrec :: Int -> JSONWebKeySet -> ShowS
$cshowsPrec :: Int -> JSONWebKeySet -> ShowS
P.Show, JSONWebKeySet -> JSONWebKeySet -> Bool
(JSONWebKeySet -> JSONWebKeySet -> Bool)
-> (JSONWebKeySet -> JSONWebKeySet -> Bool) -> Eq JSONWebKeySet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JSONWebKeySet -> JSONWebKeySet -> Bool
$c/= :: JSONWebKeySet -> JSONWebKeySet -> Bool
== :: JSONWebKeySet -> JSONWebKeySet -> Bool
$c== :: JSONWebKeySet -> JSONWebKeySet -> Bool
P.Eq, P.Typeable)
instance A.FromJSON JSONWebKeySet where
parseJSON :: Value -> Parser JSONWebKeySet
parseJSON = String
-> (Object -> Parser JSONWebKeySet)
-> Value
-> Parser JSONWebKeySet
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"JSONWebKeySet" ((Object -> Parser JSONWebKeySet) -> Value -> Parser JSONWebKeySet)
-> (Object -> Parser JSONWebKeySet)
-> Value
-> Parser JSONWebKeySet
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe [JSONWebKey] -> JSONWebKeySet
JSONWebKeySet
(Maybe [JSONWebKey] -> JSONWebKeySet)
-> Parser (Maybe [JSONWebKey]) -> Parser JSONWebKeySet
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [JSONWebKey])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"keys")
instance A.ToJSON JSONWebKeySet where
toJSON :: JSONWebKeySet -> Value
toJSON JSONWebKeySet {Maybe [JSONWebKey]
jSONWebKeySetKeys :: Maybe [JSONWebKey]
jSONWebKeySetKeys :: JSONWebKeySet -> Maybe [JSONWebKey]
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"keys" Key -> Maybe [JSONWebKey] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [JSONWebKey]
jSONWebKeySetKeys
]
mkJSONWebKeySet
:: JSONWebKeySet
mkJSONWebKeySet :: JSONWebKeySet
mkJSONWebKeySet =
JSONWebKeySet :: Maybe [JSONWebKey] -> JSONWebKeySet
JSONWebKeySet
{ jSONWebKeySetKeys :: Maybe [JSONWebKey]
jSONWebKeySetKeys = Maybe [JSONWebKey]
forall a. Maybe a
Nothing
}
data JsonWebKeySetGeneratorRequest = JsonWebKeySetGeneratorRequest
{ JsonWebKeySetGeneratorRequest -> Text
jsonWebKeySetGeneratorRequestAlg :: Text
, JsonWebKeySetGeneratorRequest -> Text
jsonWebKeySetGeneratorRequestKid :: Text
, JsonWebKeySetGeneratorRequest -> Text
jsonWebKeySetGeneratorRequestUse :: Text
} deriving (Int -> JsonWebKeySetGeneratorRequest -> ShowS
[JsonWebKeySetGeneratorRequest] -> ShowS
JsonWebKeySetGeneratorRequest -> String
(Int -> JsonWebKeySetGeneratorRequest -> ShowS)
-> (JsonWebKeySetGeneratorRequest -> String)
-> ([JsonWebKeySetGeneratorRequest] -> ShowS)
-> Show JsonWebKeySetGeneratorRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JsonWebKeySetGeneratorRequest] -> ShowS
$cshowList :: [JsonWebKeySetGeneratorRequest] -> ShowS
show :: JsonWebKeySetGeneratorRequest -> String
$cshow :: JsonWebKeySetGeneratorRequest -> String
showsPrec :: Int -> JsonWebKeySetGeneratorRequest -> ShowS
$cshowsPrec :: Int -> JsonWebKeySetGeneratorRequest -> ShowS
P.Show, JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool
(JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool)
-> (JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool)
-> Eq JsonWebKeySetGeneratorRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool
$c/= :: JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool
== :: JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool
$c== :: JsonWebKeySetGeneratorRequest
-> JsonWebKeySetGeneratorRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON JsonWebKeySetGeneratorRequest where
parseJSON :: Value -> Parser JsonWebKeySetGeneratorRequest
parseJSON = String
-> (Object -> Parser JsonWebKeySetGeneratorRequest)
-> Value
-> Parser JsonWebKeySetGeneratorRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"JsonWebKeySetGeneratorRequest" ((Object -> Parser JsonWebKeySetGeneratorRequest)
-> Value -> Parser JsonWebKeySetGeneratorRequest)
-> (Object -> Parser JsonWebKeySetGeneratorRequest)
-> Value
-> Parser JsonWebKeySetGeneratorRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> Text -> Text -> JsonWebKeySetGeneratorRequest
JsonWebKeySetGeneratorRequest
(Text -> Text -> Text -> JsonWebKeySetGeneratorRequest)
-> Parser Text
-> Parser (Text -> Text -> JsonWebKeySetGeneratorRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"alg")
Parser (Text -> Text -> JsonWebKeySetGeneratorRequest)
-> Parser Text -> Parser (Text -> JsonWebKeySetGeneratorRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"kid")
Parser (Text -> JsonWebKeySetGeneratorRequest)
-> Parser Text -> Parser JsonWebKeySetGeneratorRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"use")
instance A.ToJSON JsonWebKeySetGeneratorRequest where
toJSON :: JsonWebKeySetGeneratorRequest -> Value
toJSON JsonWebKeySetGeneratorRequest {Text
jsonWebKeySetGeneratorRequestUse :: Text
jsonWebKeySetGeneratorRequestKid :: Text
jsonWebKeySetGeneratorRequestAlg :: Text
jsonWebKeySetGeneratorRequestUse :: JsonWebKeySetGeneratorRequest -> Text
jsonWebKeySetGeneratorRequestKid :: JsonWebKeySetGeneratorRequest -> Text
jsonWebKeySetGeneratorRequestAlg :: JsonWebKeySetGeneratorRequest -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"alg" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jsonWebKeySetGeneratorRequestAlg
, Key
"kid" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jsonWebKeySetGeneratorRequestKid
, Key
"use" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
jsonWebKeySetGeneratorRequestUse
]
mkJsonWebKeySetGeneratorRequest
:: Text
-> Text
-> Text
-> JsonWebKeySetGeneratorRequest
mkJsonWebKeySetGeneratorRequest :: Text -> Text -> Text -> JsonWebKeySetGeneratorRequest
mkJsonWebKeySetGeneratorRequest Text
jsonWebKeySetGeneratorRequestAlg Text
jsonWebKeySetGeneratorRequestKid Text
jsonWebKeySetGeneratorRequestUse =
JsonWebKeySetGeneratorRequest :: Text -> Text -> Text -> JsonWebKeySetGeneratorRequest
JsonWebKeySetGeneratorRequest
{ Text
jsonWebKeySetGeneratorRequestAlg :: Text
jsonWebKeySetGeneratorRequestAlg :: Text
jsonWebKeySetGeneratorRequestAlg
, Text
jsonWebKeySetGeneratorRequestKid :: Text
jsonWebKeySetGeneratorRequestKid :: Text
jsonWebKeySetGeneratorRequestKid
, Text
jsonWebKeySetGeneratorRequestUse :: Text
jsonWebKeySetGeneratorRequestUse :: Text
jsonWebKeySetGeneratorRequestUse
}
data LoginRequest = LoginRequest
{ LoginRequest -> Text
loginRequestChallenge :: Text
, LoginRequest -> OAuth2Client
loginRequestClient :: OAuth2Client
, LoginRequest -> Maybe OpenIDConnectContext
loginRequestOidcContext :: Maybe OpenIDConnectContext
, LoginRequest -> Text
loginRequestRequestUrl :: Text
, LoginRequest -> [Text]
loginRequestRequestedAccessTokenAudience :: [Text]
, LoginRequest -> [Text]
loginRequestRequestedScope :: [Text]
, LoginRequest -> Maybe Text
loginRequestSessionId :: Maybe Text
, LoginRequest -> Bool
loginRequestSkip :: Bool
, LoginRequest -> Text
loginRequestSubject :: Text
} deriving (Int -> LoginRequest -> ShowS
[LoginRequest] -> ShowS
LoginRequest -> String
(Int -> LoginRequest -> ShowS)
-> (LoginRequest -> String)
-> ([LoginRequest] -> ShowS)
-> Show LoginRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoginRequest] -> ShowS
$cshowList :: [LoginRequest] -> ShowS
show :: LoginRequest -> String
$cshow :: LoginRequest -> String
showsPrec :: Int -> LoginRequest -> ShowS
$cshowsPrec :: Int -> LoginRequest -> ShowS
P.Show, LoginRequest -> LoginRequest -> Bool
(LoginRequest -> LoginRequest -> Bool)
-> (LoginRequest -> LoginRequest -> Bool) -> Eq LoginRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoginRequest -> LoginRequest -> Bool
$c/= :: LoginRequest -> LoginRequest -> Bool
== :: LoginRequest -> LoginRequest -> Bool
$c== :: LoginRequest -> LoginRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON LoginRequest where
parseJSON :: Value -> Parser LoginRequest
parseJSON = String
-> (Object -> Parser LoginRequest) -> Value -> Parser LoginRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"LoginRequest" ((Object -> Parser LoginRequest) -> Value -> Parser LoginRequest)
-> (Object -> Parser LoginRequest) -> Value -> Parser LoginRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text
-> OAuth2Client
-> Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest
LoginRequest
(Text
-> OAuth2Client
-> Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest)
-> Parser Text
-> Parser
(OAuth2Client
-> Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"challenge")
Parser
(OAuth2Client
-> Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest)
-> Parser OAuth2Client
-> Parser
(Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser OAuth2Client
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"client")
Parser
(Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest)
-> Parser (Maybe OpenIDConnectContext)
-> Parser
(Text
-> [Text] -> [Text] -> Maybe Text -> Bool -> Text -> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe OpenIDConnectContext)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"oidc_context")
Parser
(Text
-> [Text] -> [Text] -> Maybe Text -> Bool -> Text -> LoginRequest)
-> Parser Text
-> Parser
([Text] -> [Text] -> Maybe Text -> Bool -> Text -> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"request_url")
Parser
([Text] -> [Text] -> Maybe Text -> Bool -> Text -> LoginRequest)
-> Parser [Text]
-> Parser ([Text] -> Maybe Text -> Bool -> Text -> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"requested_access_token_audience")
Parser ([Text] -> Maybe Text -> Bool -> Text -> LoginRequest)
-> Parser [Text]
-> Parser (Maybe Text -> Bool -> Text -> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"requested_scope")
Parser (Maybe Text -> Bool -> Text -> LoginRequest)
-> Parser (Maybe Text) -> Parser (Bool -> Text -> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"session_id")
Parser (Bool -> Text -> LoginRequest)
-> Parser Bool -> Parser (Text -> LoginRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"skip")
Parser (Text -> LoginRequest) -> Parser Text -> Parser LoginRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"subject")
instance A.ToJSON LoginRequest where
toJSON :: LoginRequest -> Value
toJSON LoginRequest {Bool
[Text]
Maybe Text
Maybe OpenIDConnectContext
Text
OAuth2Client
loginRequestSubject :: Text
loginRequestSkip :: Bool
loginRequestSessionId :: Maybe Text
loginRequestRequestedScope :: [Text]
loginRequestRequestedAccessTokenAudience :: [Text]
loginRequestRequestUrl :: Text
loginRequestOidcContext :: Maybe OpenIDConnectContext
loginRequestClient :: OAuth2Client
loginRequestChallenge :: Text
loginRequestSubject :: LoginRequest -> Text
loginRequestSkip :: LoginRequest -> Bool
loginRequestSessionId :: LoginRequest -> Maybe Text
loginRequestRequestedScope :: LoginRequest -> [Text]
loginRequestRequestedAccessTokenAudience :: LoginRequest -> [Text]
loginRequestRequestUrl :: LoginRequest -> Text
loginRequestOidcContext :: LoginRequest -> Maybe OpenIDConnectContext
loginRequestClient :: LoginRequest -> OAuth2Client
loginRequestChallenge :: LoginRequest -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"challenge" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
loginRequestChallenge
, Key
"client" Key -> OAuth2Client -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= OAuth2Client
loginRequestClient
, Key
"oidc_context" Key -> Maybe OpenIDConnectContext -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe OpenIDConnectContext
loginRequestOidcContext
, Key
"request_url" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
loginRequestRequestUrl
, Key
"requested_access_token_audience" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
loginRequestRequestedAccessTokenAudience
, Key
"requested_scope" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
loginRequestRequestedScope
, Key
"session_id" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
loginRequestSessionId
, Key
"skip" Key -> Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
loginRequestSkip
, Key
"subject" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
loginRequestSubject
]
mkLoginRequest
:: Text
-> OAuth2Client
-> Text
-> [Text]
-> [Text]
-> Bool
-> Text
-> LoginRequest
mkLoginRequest :: Text
-> OAuth2Client
-> Text
-> [Text]
-> [Text]
-> Bool
-> Text
-> LoginRequest
mkLoginRequest Text
loginRequestChallenge OAuth2Client
loginRequestClient Text
loginRequestRequestUrl [Text]
loginRequestRequestedAccessTokenAudience [Text]
loginRequestRequestedScope Bool
loginRequestSkip Text
loginRequestSubject =
LoginRequest :: Text
-> OAuth2Client
-> Maybe OpenIDConnectContext
-> Text
-> [Text]
-> [Text]
-> Maybe Text
-> Bool
-> Text
-> LoginRequest
LoginRequest
{ Text
loginRequestChallenge :: Text
loginRequestChallenge :: Text
loginRequestChallenge
, OAuth2Client
loginRequestClient :: OAuth2Client
loginRequestClient :: OAuth2Client
loginRequestClient
, loginRequestOidcContext :: Maybe OpenIDConnectContext
loginRequestOidcContext = Maybe OpenIDConnectContext
forall a. Maybe a
Nothing
, Text
loginRequestRequestUrl :: Text
loginRequestRequestUrl :: Text
loginRequestRequestUrl
, [Text]
loginRequestRequestedAccessTokenAudience :: [Text]
loginRequestRequestedAccessTokenAudience :: [Text]
loginRequestRequestedAccessTokenAudience
, [Text]
loginRequestRequestedScope :: [Text]
loginRequestRequestedScope :: [Text]
loginRequestRequestedScope
, loginRequestSessionId :: Maybe Text
loginRequestSessionId = Maybe Text
forall a. Maybe a
Nothing
, Bool
loginRequestSkip :: Bool
loginRequestSkip :: Bool
loginRequestSkip
, Text
loginRequestSubject :: Text
loginRequestSubject :: Text
loginRequestSubject
}
data LogoutRequest = LogoutRequest
{ LogoutRequest -> Maybe Text
logoutRequestRequestUrl :: Maybe Text
, LogoutRequest -> Maybe Bool
logoutRequestRpInitiated :: Maybe Bool
, LogoutRequest -> Maybe Text
logoutRequestSid :: Maybe Text
, LogoutRequest -> Maybe Text
logoutRequestSubject :: Maybe Text
} deriving (Int -> LogoutRequest -> ShowS
[LogoutRequest] -> ShowS
LogoutRequest -> String
(Int -> LogoutRequest -> ShowS)
-> (LogoutRequest -> String)
-> ([LogoutRequest] -> ShowS)
-> Show LogoutRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogoutRequest] -> ShowS
$cshowList :: [LogoutRequest] -> ShowS
show :: LogoutRequest -> String
$cshow :: LogoutRequest -> String
showsPrec :: Int -> LogoutRequest -> ShowS
$cshowsPrec :: Int -> LogoutRequest -> ShowS
P.Show, LogoutRequest -> LogoutRequest -> Bool
(LogoutRequest -> LogoutRequest -> Bool)
-> (LogoutRequest -> LogoutRequest -> Bool) -> Eq LogoutRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogoutRequest -> LogoutRequest -> Bool
$c/= :: LogoutRequest -> LogoutRequest -> Bool
== :: LogoutRequest -> LogoutRequest -> Bool
$c== :: LogoutRequest -> LogoutRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON LogoutRequest where
parseJSON :: Value -> Parser LogoutRequest
parseJSON = String
-> (Object -> Parser LogoutRequest)
-> Value
-> Parser LogoutRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"LogoutRequest" ((Object -> Parser LogoutRequest) -> Value -> Parser LogoutRequest)
-> (Object -> Parser LogoutRequest)
-> Value
-> Parser LogoutRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Maybe Bool -> Maybe Text -> Maybe Text -> LogoutRequest
LogoutRequest
(Maybe Text
-> Maybe Bool -> Maybe Text -> Maybe Text -> LogoutRequest)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Maybe Text -> Maybe Text -> LogoutRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_url")
Parser (Maybe Bool -> Maybe Text -> Maybe Text -> LogoutRequest)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> LogoutRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rp_initiated")
Parser (Maybe Text -> Maybe Text -> LogoutRequest)
-> Parser (Maybe Text) -> Parser (Maybe Text -> LogoutRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sid")
Parser (Maybe Text -> LogoutRequest)
-> Parser (Maybe Text) -> Parser LogoutRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subject")
instance A.ToJSON LogoutRequest where
toJSON :: LogoutRequest -> Value
toJSON LogoutRequest {Maybe Bool
Maybe Text
logoutRequestSubject :: Maybe Text
logoutRequestSid :: Maybe Text
logoutRequestRpInitiated :: Maybe Bool
logoutRequestRequestUrl :: Maybe Text
logoutRequestSubject :: LogoutRequest -> Maybe Text
logoutRequestSid :: LogoutRequest -> Maybe Text
logoutRequestRpInitiated :: LogoutRequest -> Maybe Bool
logoutRequestRequestUrl :: LogoutRequest -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"request_url" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
logoutRequestRequestUrl
, Key
"rp_initiated" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
logoutRequestRpInitiated
, Key
"sid" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
logoutRequestSid
, Key
"subject" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
logoutRequestSubject
]
mkLogoutRequest
:: LogoutRequest
mkLogoutRequest :: LogoutRequest
mkLogoutRequest =
LogoutRequest :: Maybe Text
-> Maybe Bool -> Maybe Text -> Maybe Text -> LogoutRequest
LogoutRequest
{ logoutRequestRequestUrl :: Maybe Text
logoutRequestRequestUrl = Maybe Text
forall a. Maybe a
Nothing
, logoutRequestRpInitiated :: Maybe Bool
logoutRequestRpInitiated = Maybe Bool
forall a. Maybe a
Nothing
, logoutRequestSid :: Maybe Text
logoutRequestSid = Maybe Text
forall a. Maybe a
Nothing
, logoutRequestSubject :: Maybe Text
logoutRequestSubject = Maybe Text
forall a. Maybe a
Nothing
}
data OAuth2Client = OAuth2Client
{ OAuth2Client -> Maybe [Text]
oAuth2ClientAllowedCorsOrigins :: Maybe [Text]
, OAuth2Client -> Maybe [Text]
oAuth2ClientAudience :: Maybe [Text]
, OAuth2Client -> Maybe Bool
oAuth2ClientBackchannelLogoutSessionRequired :: Maybe Bool
, OAuth2Client -> Maybe Text
oAuth2ClientBackchannelLogoutUri :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientClientId :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientClientName :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientClientSecret :: Maybe Text
, OAuth2Client -> Maybe Integer
oAuth2ClientClientSecretExpiresAt :: Maybe Integer
, OAuth2Client -> Maybe Text
oAuth2ClientClientUri :: Maybe Text
, OAuth2Client -> Maybe [Text]
oAuth2ClientContacts :: Maybe [Text]
, OAuth2Client -> Maybe DateTime
oAuth2ClientCreatedAt :: Maybe DateTime
, OAuth2Client -> Maybe Bool
oAuth2ClientFrontchannelLogoutSessionRequired :: Maybe Bool
, OAuth2Client -> Maybe Text
oAuth2ClientFrontchannelLogoutUri :: Maybe Text
, OAuth2Client -> Maybe [Text]
oAuth2ClientGrantTypes :: Maybe [Text]
, OAuth2Client -> Maybe Value
oAuth2ClientJwks :: Maybe A.Value
, OAuth2Client -> Maybe Text
oAuth2ClientJwksUri :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientLogoUri :: Maybe Text
, OAuth2Client -> Maybe Value
oAuth2ClientMetadata :: Maybe A.Value
, OAuth2Client -> Maybe Text
oAuth2ClientOwner :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientPolicyUri :: Maybe Text
, OAuth2Client -> Maybe [Text]
oAuth2ClientPostLogoutRedirectUris :: Maybe [Text]
, OAuth2Client -> Maybe [Text]
oAuth2ClientRedirectUris :: Maybe [Text]
, OAuth2Client -> Maybe Text
oAuth2ClientRequestObjectSigningAlg :: Maybe Text
, OAuth2Client -> Maybe [Text]
oAuth2ClientRequestUris :: Maybe [Text]
, OAuth2Client -> Maybe [Text]
oAuth2ClientResponseTypes :: Maybe [Text]
, OAuth2Client -> Maybe Text
oAuth2ClientScope :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientSectorIdentifierUri :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientSubjectType :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientTokenEndpointAuthMethod :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientTokenEndpointAuthSigningAlg :: Maybe Text
, OAuth2Client -> Maybe Text
oAuth2ClientTosUri :: Maybe Text
, OAuth2Client -> Maybe DateTime
oAuth2ClientUpdatedAt :: Maybe DateTime
, OAuth2Client -> Maybe Text
oAuth2ClientUserinfoSignedResponseAlg :: Maybe Text
} deriving (Int -> OAuth2Client -> ShowS
[OAuth2Client] -> ShowS
OAuth2Client -> String
(Int -> OAuth2Client -> ShowS)
-> (OAuth2Client -> String)
-> ([OAuth2Client] -> ShowS)
-> Show OAuth2Client
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OAuth2Client] -> ShowS
$cshowList :: [OAuth2Client] -> ShowS
show :: OAuth2Client -> String
$cshow :: OAuth2Client -> String
showsPrec :: Int -> OAuth2Client -> ShowS
$cshowsPrec :: Int -> OAuth2Client -> ShowS
P.Show, OAuth2Client -> OAuth2Client -> Bool
(OAuth2Client -> OAuth2Client -> Bool)
-> (OAuth2Client -> OAuth2Client -> Bool) -> Eq OAuth2Client
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OAuth2Client -> OAuth2Client -> Bool
$c/= :: OAuth2Client -> OAuth2Client -> Bool
== :: OAuth2Client -> OAuth2Client -> Bool
$c== :: OAuth2Client -> OAuth2Client -> Bool
P.Eq, P.Typeable)
instance A.FromJSON OAuth2Client where
parseJSON :: Value -> Parser OAuth2Client
parseJSON = String
-> (Object -> Parser OAuth2Client) -> Value -> Parser OAuth2Client
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"OAuth2Client" ((Object -> Parser OAuth2Client) -> Value -> Parser OAuth2Client)
-> (Object -> Parser OAuth2Client) -> Value -> Parser OAuth2Client
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client
OAuth2Client
(Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"allowed_cors_origins")
Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"audience")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"backchannel_logout_session_required")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"backchannel_logout_uri")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client_id")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client_name")
Parser
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client_secret")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client_secret_expires_at")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client_uri")
Parser
(Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"contacts")
Parser
(Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe DateTime)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"created_at")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"frontchannel_logout_session_required")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"frontchannel_logout_uri")
Parser
(Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grant_types")
Parser
(Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Value)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"jwks")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"jwks_uri")
Parser
(Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"logo_uri")
Parser
(Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Value)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"metadata")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"owner")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"policy_uri")
Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"post_logout_redirect_uris")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"redirect_uris")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_object_signing_alg")
Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_uris")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"response_types")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sector_identifier_uri")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"subject_type")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe DateTime -> Maybe Text -> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token_endpoint_auth_method")
Parser
(Maybe Text
-> Maybe Text -> Maybe DateTime -> Maybe Text -> OAuth2Client)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe DateTime -> Maybe Text -> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token_endpoint_auth_signing_alg")
Parser (Maybe Text -> Maybe DateTime -> Maybe Text -> OAuth2Client)
-> Parser (Maybe Text)
-> Parser (Maybe DateTime -> Maybe Text -> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"tos_uri")
Parser (Maybe DateTime -> Maybe Text -> OAuth2Client)
-> Parser (Maybe DateTime) -> Parser (Maybe Text -> OAuth2Client)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updated_at")
Parser (Maybe Text -> OAuth2Client)
-> Parser (Maybe Text) -> Parser OAuth2Client
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"userinfo_signed_response_alg")
instance A.ToJSON OAuth2Client where
toJSON :: OAuth2Client -> Value
toJSON OAuth2Client {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe Text
Maybe Value
Maybe DateTime
oAuth2ClientUserinfoSignedResponseAlg :: Maybe Text
oAuth2ClientUpdatedAt :: Maybe DateTime
oAuth2ClientTosUri :: Maybe Text
oAuth2ClientTokenEndpointAuthSigningAlg :: Maybe Text
oAuth2ClientTokenEndpointAuthMethod :: Maybe Text
oAuth2ClientSubjectType :: Maybe Text
oAuth2ClientSectorIdentifierUri :: Maybe Text
oAuth2ClientScope :: Maybe Text
oAuth2ClientResponseTypes :: Maybe [Text]
oAuth2ClientRequestUris :: Maybe [Text]
oAuth2ClientRequestObjectSigningAlg :: Maybe Text
oAuth2ClientRedirectUris :: Maybe [Text]
oAuth2ClientPostLogoutRedirectUris :: Maybe [Text]
oAuth2ClientPolicyUri :: Maybe Text
oAuth2ClientOwner :: Maybe Text
oAuth2ClientMetadata :: Maybe Value
oAuth2ClientLogoUri :: Maybe Text
oAuth2ClientJwksUri :: Maybe Text
oAuth2ClientJwks :: Maybe Value
oAuth2ClientGrantTypes :: Maybe [Text]
oAuth2ClientFrontchannelLogoutUri :: Maybe Text
oAuth2ClientFrontchannelLogoutSessionRequired :: Maybe Bool
oAuth2ClientCreatedAt :: Maybe DateTime
oAuth2ClientContacts :: Maybe [Text]
oAuth2ClientClientUri :: Maybe Text
oAuth2ClientClientSecretExpiresAt :: Maybe Integer
oAuth2ClientClientSecret :: Maybe Text
oAuth2ClientClientName :: Maybe Text
oAuth2ClientClientId :: Maybe Text
oAuth2ClientBackchannelLogoutUri :: Maybe Text
oAuth2ClientBackchannelLogoutSessionRequired :: Maybe Bool
oAuth2ClientAudience :: Maybe [Text]
oAuth2ClientAllowedCorsOrigins :: Maybe [Text]
oAuth2ClientUserinfoSignedResponseAlg :: OAuth2Client -> Maybe Text
oAuth2ClientUpdatedAt :: OAuth2Client -> Maybe DateTime
oAuth2ClientTosUri :: OAuth2Client -> Maybe Text
oAuth2ClientTokenEndpointAuthSigningAlg :: OAuth2Client -> Maybe Text
oAuth2ClientTokenEndpointAuthMethod :: OAuth2Client -> Maybe Text
oAuth2ClientSubjectType :: OAuth2Client -> Maybe Text
oAuth2ClientSectorIdentifierUri :: OAuth2Client -> Maybe Text
oAuth2ClientScope :: OAuth2Client -> Maybe Text
oAuth2ClientResponseTypes :: OAuth2Client -> Maybe [Text]
oAuth2ClientRequestUris :: OAuth2Client -> Maybe [Text]
oAuth2ClientRequestObjectSigningAlg :: OAuth2Client -> Maybe Text
oAuth2ClientRedirectUris :: OAuth2Client -> Maybe [Text]
oAuth2ClientPostLogoutRedirectUris :: OAuth2Client -> Maybe [Text]
oAuth2ClientPolicyUri :: OAuth2Client -> Maybe Text
oAuth2ClientOwner :: OAuth2Client -> Maybe Text
oAuth2ClientMetadata :: OAuth2Client -> Maybe Value
oAuth2ClientLogoUri :: OAuth2Client -> Maybe Text
oAuth2ClientJwksUri :: OAuth2Client -> Maybe Text
oAuth2ClientJwks :: OAuth2Client -> Maybe Value
oAuth2ClientGrantTypes :: OAuth2Client -> Maybe [Text]
oAuth2ClientFrontchannelLogoutUri :: OAuth2Client -> Maybe Text
oAuth2ClientFrontchannelLogoutSessionRequired :: OAuth2Client -> Maybe Bool
oAuth2ClientCreatedAt :: OAuth2Client -> Maybe DateTime
oAuth2ClientContacts :: OAuth2Client -> Maybe [Text]
oAuth2ClientClientUri :: OAuth2Client -> Maybe Text
oAuth2ClientClientSecretExpiresAt :: OAuth2Client -> Maybe Integer
oAuth2ClientClientSecret :: OAuth2Client -> Maybe Text
oAuth2ClientClientName :: OAuth2Client -> Maybe Text
oAuth2ClientClientId :: OAuth2Client -> Maybe Text
oAuth2ClientBackchannelLogoutUri :: OAuth2Client -> Maybe Text
oAuth2ClientBackchannelLogoutSessionRequired :: OAuth2Client -> Maybe Bool
oAuth2ClientAudience :: OAuth2Client -> Maybe [Text]
oAuth2ClientAllowedCorsOrigins :: OAuth2Client -> Maybe [Text]
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"allowed_cors_origins" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientAllowedCorsOrigins
, Key
"audience" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientAudience
, Key
"backchannel_logout_session_required" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
oAuth2ClientBackchannelLogoutSessionRequired
, Key
"backchannel_logout_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientBackchannelLogoutUri
, Key
"client_id" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientClientId
, Key
"client_name" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientClientName
, Key
"client_secret" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientClientSecret
, Key
"client_secret_expires_at" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
oAuth2ClientClientSecretExpiresAt
, Key
"client_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientClientUri
, Key
"contacts" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientContacts
, Key
"created_at" Key -> Maybe DateTime -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
oAuth2ClientCreatedAt
, Key
"frontchannel_logout_session_required" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
oAuth2ClientFrontchannelLogoutSessionRequired
, Key
"frontchannel_logout_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientFrontchannelLogoutUri
, Key
"grant_types" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientGrantTypes
, Key
"jwks" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
oAuth2ClientJwks
, Key
"jwks_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientJwksUri
, Key
"logo_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientLogoUri
, Key
"metadata" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
oAuth2ClientMetadata
, Key
"owner" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientOwner
, Key
"policy_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientPolicyUri
, Key
"post_logout_redirect_uris" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientPostLogoutRedirectUris
, Key
"redirect_uris" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientRedirectUris
, Key
"request_object_signing_alg" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientRequestObjectSigningAlg
, Key
"request_uris" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientRequestUris
, Key
"response_types" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2ClientResponseTypes
, Key
"scope" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientScope
, Key
"sector_identifier_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientSectorIdentifierUri
, Key
"subject_type" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientSubjectType
, Key
"token_endpoint_auth_method" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientTokenEndpointAuthMethod
, Key
"token_endpoint_auth_signing_alg" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientTokenEndpointAuthSigningAlg
, Key
"tos_uri" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientTosUri
, Key
"updated_at" Key -> Maybe DateTime -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
oAuth2ClientUpdatedAt
, Key
"userinfo_signed_response_alg" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2ClientUserinfoSignedResponseAlg
]
mkOAuth2Client
:: OAuth2Client
mkOAuth2Client :: OAuth2Client
mkOAuth2Client =
OAuth2Client :: Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DateTime
-> Maybe Text
-> OAuth2Client
OAuth2Client
{ oAuth2ClientAllowedCorsOrigins :: Maybe [Text]
oAuth2ClientAllowedCorsOrigins = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientAudience :: Maybe [Text]
oAuth2ClientAudience = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientBackchannelLogoutSessionRequired :: Maybe Bool
oAuth2ClientBackchannelLogoutSessionRequired = Maybe Bool
forall a. Maybe a
Nothing
, oAuth2ClientBackchannelLogoutUri :: Maybe Text
oAuth2ClientBackchannelLogoutUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientClientId :: Maybe Text
oAuth2ClientClientId = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientClientName :: Maybe Text
oAuth2ClientClientName = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientClientSecret :: Maybe Text
oAuth2ClientClientSecret = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientClientSecretExpiresAt :: Maybe Integer
oAuth2ClientClientSecretExpiresAt = Maybe Integer
forall a. Maybe a
Nothing
, oAuth2ClientClientUri :: Maybe Text
oAuth2ClientClientUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientContacts :: Maybe [Text]
oAuth2ClientContacts = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientCreatedAt :: Maybe DateTime
oAuth2ClientCreatedAt = Maybe DateTime
forall a. Maybe a
Nothing
, oAuth2ClientFrontchannelLogoutSessionRequired :: Maybe Bool
oAuth2ClientFrontchannelLogoutSessionRequired = Maybe Bool
forall a. Maybe a
Nothing
, oAuth2ClientFrontchannelLogoutUri :: Maybe Text
oAuth2ClientFrontchannelLogoutUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientGrantTypes :: Maybe [Text]
oAuth2ClientGrantTypes = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientJwks :: Maybe Value
oAuth2ClientJwks = Maybe Value
forall a. Maybe a
Nothing
, oAuth2ClientJwksUri :: Maybe Text
oAuth2ClientJwksUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientLogoUri :: Maybe Text
oAuth2ClientLogoUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientMetadata :: Maybe Value
oAuth2ClientMetadata = Maybe Value
forall a. Maybe a
Nothing
, oAuth2ClientOwner :: Maybe Text
oAuth2ClientOwner = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientPolicyUri :: Maybe Text
oAuth2ClientPolicyUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientPostLogoutRedirectUris :: Maybe [Text]
oAuth2ClientPostLogoutRedirectUris = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientRedirectUris :: Maybe [Text]
oAuth2ClientRedirectUris = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientRequestObjectSigningAlg :: Maybe Text
oAuth2ClientRequestObjectSigningAlg = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientRequestUris :: Maybe [Text]
oAuth2ClientRequestUris = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientResponseTypes :: Maybe [Text]
oAuth2ClientResponseTypes = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2ClientScope :: Maybe Text
oAuth2ClientScope = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientSectorIdentifierUri :: Maybe Text
oAuth2ClientSectorIdentifierUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientSubjectType :: Maybe Text
oAuth2ClientSubjectType = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientTokenEndpointAuthMethod :: Maybe Text
oAuth2ClientTokenEndpointAuthMethod = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientTokenEndpointAuthSigningAlg :: Maybe Text
oAuth2ClientTokenEndpointAuthSigningAlg = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientTosUri :: Maybe Text
oAuth2ClientTosUri = Maybe Text
forall a. Maybe a
Nothing
, oAuth2ClientUpdatedAt :: Maybe DateTime
oAuth2ClientUpdatedAt = Maybe DateTime
forall a. Maybe a
Nothing
, oAuth2ClientUserinfoSignedResponseAlg :: Maybe Text
oAuth2ClientUserinfoSignedResponseAlg = Maybe Text
forall a. Maybe a
Nothing
}
data OAuth2TokenIntrospection = OAuth2TokenIntrospection
{ OAuth2TokenIntrospection -> Bool
oAuth2TokenIntrospectionActive :: Bool
, OAuth2TokenIntrospection -> Maybe [Text]
oAuth2TokenIntrospectionAud :: Maybe [Text]
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionClientId :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Integer
oAuth2TokenIntrospectionExp :: Maybe Integer
, OAuth2TokenIntrospection -> Maybe Value
oAuth2TokenIntrospectionExt :: Maybe A.Value
, OAuth2TokenIntrospection -> Maybe Integer
oAuth2TokenIntrospectionIat :: Maybe Integer
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionIss :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Integer
oAuth2TokenIntrospectionNbf :: Maybe Integer
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionObfuscatedSubject :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionScope :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionSub :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionTokenType :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionTokenUse :: Maybe Text
, OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionUsername :: Maybe Text
} deriving (Int -> OAuth2TokenIntrospection -> ShowS
[OAuth2TokenIntrospection] -> ShowS
OAuth2TokenIntrospection -> String
(Int -> OAuth2TokenIntrospection -> ShowS)
-> (OAuth2TokenIntrospection -> String)
-> ([OAuth2TokenIntrospection] -> ShowS)
-> Show OAuth2TokenIntrospection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OAuth2TokenIntrospection] -> ShowS
$cshowList :: [OAuth2TokenIntrospection] -> ShowS
show :: OAuth2TokenIntrospection -> String
$cshow :: OAuth2TokenIntrospection -> String
showsPrec :: Int -> OAuth2TokenIntrospection -> ShowS
$cshowsPrec :: Int -> OAuth2TokenIntrospection -> ShowS
P.Show, OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool
(OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool)
-> (OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool)
-> Eq OAuth2TokenIntrospection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool
$c/= :: OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool
== :: OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool
$c== :: OAuth2TokenIntrospection -> OAuth2TokenIntrospection -> Bool
P.Eq, P.Typeable)
instance A.FromJSON OAuth2TokenIntrospection where
parseJSON :: Value -> Parser OAuth2TokenIntrospection
parseJSON = String
-> (Object -> Parser OAuth2TokenIntrospection)
-> Value
-> Parser OAuth2TokenIntrospection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"OAuth2TokenIntrospection" ((Object -> Parser OAuth2TokenIntrospection)
-> Value -> Parser OAuth2TokenIntrospection)
-> (Object -> Parser OAuth2TokenIntrospection)
-> Value
-> Parser OAuth2TokenIntrospection
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection
OAuth2TokenIntrospection
(Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser Bool
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"active")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"aud")
Parser
(Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"client_id")
Parser
(Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Integer)
-> Parser
(Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"exp")
Parser
(Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Value)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ext")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"iat")
Parser
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"iss")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nbf")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"obfuscated_subject")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sub")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token_type")
Parser (Maybe Text -> Maybe Text -> OAuth2TokenIntrospection)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> OAuth2TokenIntrospection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token_use")
Parser (Maybe Text -> OAuth2TokenIntrospection)
-> Parser (Maybe Text) -> Parser OAuth2TokenIntrospection
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"username")
instance A.ToJSON OAuth2TokenIntrospection where
toJSON :: OAuth2TokenIntrospection -> Value
toJSON OAuth2TokenIntrospection {Bool
Maybe Integer
Maybe [Text]
Maybe Text
Maybe Value
oAuth2TokenIntrospectionUsername :: Maybe Text
oAuth2TokenIntrospectionTokenUse :: Maybe Text
oAuth2TokenIntrospectionTokenType :: Maybe Text
oAuth2TokenIntrospectionSub :: Maybe Text
oAuth2TokenIntrospectionScope :: Maybe Text
oAuth2TokenIntrospectionObfuscatedSubject :: Maybe Text
oAuth2TokenIntrospectionNbf :: Maybe Integer
oAuth2TokenIntrospectionIss :: Maybe Text
oAuth2TokenIntrospectionIat :: Maybe Integer
oAuth2TokenIntrospectionExt :: Maybe Value
oAuth2TokenIntrospectionExp :: Maybe Integer
oAuth2TokenIntrospectionClientId :: Maybe Text
oAuth2TokenIntrospectionAud :: Maybe [Text]
oAuth2TokenIntrospectionActive :: Bool
oAuth2TokenIntrospectionUsername :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionTokenUse :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionTokenType :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionSub :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionScope :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionObfuscatedSubject :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionNbf :: OAuth2TokenIntrospection -> Maybe Integer
oAuth2TokenIntrospectionIss :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionIat :: OAuth2TokenIntrospection -> Maybe Integer
oAuth2TokenIntrospectionExt :: OAuth2TokenIntrospection -> Maybe Value
oAuth2TokenIntrospectionExp :: OAuth2TokenIntrospection -> Maybe Integer
oAuth2TokenIntrospectionClientId :: OAuth2TokenIntrospection -> Maybe Text
oAuth2TokenIntrospectionAud :: OAuth2TokenIntrospection -> Maybe [Text]
oAuth2TokenIntrospectionActive :: OAuth2TokenIntrospection -> Bool
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"active" Key -> Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
oAuth2TokenIntrospectionActive
, Key
"aud" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
oAuth2TokenIntrospectionAud
, Key
"client_id" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionClientId
, Key
"exp" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
oAuth2TokenIntrospectionExp
, Key
"ext" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
oAuth2TokenIntrospectionExt
, Key
"iat" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
oAuth2TokenIntrospectionIat
, Key
"iss" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionIss
, Key
"nbf" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
oAuth2TokenIntrospectionNbf
, Key
"obfuscated_subject" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionObfuscatedSubject
, Key
"scope" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionScope
, Key
"sub" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionSub
, Key
"token_type" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionTokenType
, Key
"token_use" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionTokenUse
, Key
"username" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oAuth2TokenIntrospectionUsername
]
mkOAuth2TokenIntrospection
:: Bool
-> OAuth2TokenIntrospection
mkOAuth2TokenIntrospection :: Bool -> OAuth2TokenIntrospection
mkOAuth2TokenIntrospection Bool
oAuth2TokenIntrospectionActive =
OAuth2TokenIntrospection :: Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Integer
-> Maybe Value
-> Maybe Integer
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OAuth2TokenIntrospection
OAuth2TokenIntrospection
{ Bool
oAuth2TokenIntrospectionActive :: Bool
oAuth2TokenIntrospectionActive :: Bool
oAuth2TokenIntrospectionActive
, oAuth2TokenIntrospectionAud :: Maybe [Text]
oAuth2TokenIntrospectionAud = Maybe [Text]
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionClientId :: Maybe Text
oAuth2TokenIntrospectionClientId = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionExp :: Maybe Integer
oAuth2TokenIntrospectionExp = Maybe Integer
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionExt :: Maybe Value
oAuth2TokenIntrospectionExt = Maybe Value
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionIat :: Maybe Integer
oAuth2TokenIntrospectionIat = Maybe Integer
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionIss :: Maybe Text
oAuth2TokenIntrospectionIss = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionNbf :: Maybe Integer
oAuth2TokenIntrospectionNbf = Maybe Integer
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionObfuscatedSubject :: Maybe Text
oAuth2TokenIntrospectionObfuscatedSubject = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionScope :: Maybe Text
oAuth2TokenIntrospectionScope = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionSub :: Maybe Text
oAuth2TokenIntrospectionSub = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionTokenType :: Maybe Text
oAuth2TokenIntrospectionTokenType = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionTokenUse :: Maybe Text
oAuth2TokenIntrospectionTokenUse = Maybe Text
forall a. Maybe a
Nothing
, oAuth2TokenIntrospectionUsername :: Maybe Text
oAuth2TokenIntrospectionUsername = Maybe Text
forall a. Maybe a
Nothing
}
data Oauth2TokenResponse = Oauth2TokenResponse
{ Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseAccessToken :: Maybe Text
, Oauth2TokenResponse -> Maybe Integer
oauth2TokenResponseExpiresIn :: Maybe Integer
, Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseIdToken :: Maybe Text
, Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseRefreshToken :: Maybe Text
, Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseScope :: Maybe Text
, Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseTokenType :: Maybe Text
} deriving (Int -> Oauth2TokenResponse -> ShowS
[Oauth2TokenResponse] -> ShowS
Oauth2TokenResponse -> String
(Int -> Oauth2TokenResponse -> ShowS)
-> (Oauth2TokenResponse -> String)
-> ([Oauth2TokenResponse] -> ShowS)
-> Show Oauth2TokenResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Oauth2TokenResponse] -> ShowS
$cshowList :: [Oauth2TokenResponse] -> ShowS
show :: Oauth2TokenResponse -> String
$cshow :: Oauth2TokenResponse -> String
showsPrec :: Int -> Oauth2TokenResponse -> ShowS
$cshowsPrec :: Int -> Oauth2TokenResponse -> ShowS
P.Show, Oauth2TokenResponse -> Oauth2TokenResponse -> Bool
(Oauth2TokenResponse -> Oauth2TokenResponse -> Bool)
-> (Oauth2TokenResponse -> Oauth2TokenResponse -> Bool)
-> Eq Oauth2TokenResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Oauth2TokenResponse -> Oauth2TokenResponse -> Bool
$c/= :: Oauth2TokenResponse -> Oauth2TokenResponse -> Bool
== :: Oauth2TokenResponse -> Oauth2TokenResponse -> Bool
$c== :: Oauth2TokenResponse -> Oauth2TokenResponse -> Bool
P.Eq, P.Typeable)
instance A.FromJSON Oauth2TokenResponse where
parseJSON :: Value -> Parser Oauth2TokenResponse
parseJSON = String
-> (Object -> Parser Oauth2TokenResponse)
-> Value
-> Parser Oauth2TokenResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"Oauth2TokenResponse" ((Object -> Parser Oauth2TokenResponse)
-> Value -> Parser Oauth2TokenResponse)
-> (Object -> Parser Oauth2TokenResponse)
-> Value
-> Parser Oauth2TokenResponse
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Oauth2TokenResponse
Oauth2TokenResponse
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Oauth2TokenResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Oauth2TokenResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"access_token")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Oauth2TokenResponse)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Oauth2TokenResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"expires_in")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Oauth2TokenResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Oauth2TokenResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"id_token")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Oauth2TokenResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Oauth2TokenResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"refresh_token")
Parser (Maybe Text -> Maybe Text -> Oauth2TokenResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Oauth2TokenResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scope")
Parser (Maybe Text -> Oauth2TokenResponse)
-> Parser (Maybe Text) -> Parser Oauth2TokenResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token_type")
instance A.ToJSON Oauth2TokenResponse where
toJSON :: Oauth2TokenResponse -> Value
toJSON Oauth2TokenResponse {Maybe Integer
Maybe Text
oauth2TokenResponseTokenType :: Maybe Text
oauth2TokenResponseScope :: Maybe Text
oauth2TokenResponseRefreshToken :: Maybe Text
oauth2TokenResponseIdToken :: Maybe Text
oauth2TokenResponseExpiresIn :: Maybe Integer
oauth2TokenResponseAccessToken :: Maybe Text
oauth2TokenResponseTokenType :: Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseScope :: Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseRefreshToken :: Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseIdToken :: Oauth2TokenResponse -> Maybe Text
oauth2TokenResponseExpiresIn :: Oauth2TokenResponse -> Maybe Integer
oauth2TokenResponseAccessToken :: Oauth2TokenResponse -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"access_token" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oauth2TokenResponseAccessToken
, Key
"expires_in" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
oauth2TokenResponseExpiresIn
, Key
"id_token" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oauth2TokenResponseIdToken
, Key
"refresh_token" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oauth2TokenResponseRefreshToken
, Key
"scope" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oauth2TokenResponseScope
, Key
"token_type" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
oauth2TokenResponseTokenType
]
mkOauth2TokenResponse
:: Oauth2TokenResponse
mkOauth2TokenResponse :: Oauth2TokenResponse
mkOauth2TokenResponse =
Oauth2TokenResponse :: Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Oauth2TokenResponse
Oauth2TokenResponse
{ oauth2TokenResponseAccessToken :: Maybe Text
oauth2TokenResponseAccessToken = Maybe Text
forall a. Maybe a
Nothing
, oauth2TokenResponseExpiresIn :: Maybe Integer
oauth2TokenResponseExpiresIn = Maybe Integer
forall a. Maybe a
Nothing
, oauth2TokenResponseIdToken :: Maybe Text
oauth2TokenResponseIdToken = Maybe Text
forall a. Maybe a
Nothing
, oauth2TokenResponseRefreshToken :: Maybe Text
oauth2TokenResponseRefreshToken = Maybe Text
forall a. Maybe a
Nothing
, oauth2TokenResponseScope :: Maybe Text
oauth2TokenResponseScope = Maybe Text
forall a. Maybe a
Nothing
, oauth2TokenResponseTokenType :: Maybe Text
oauth2TokenResponseTokenType = Maybe Text
forall a. Maybe a
Nothing
}
data OpenIDConnectContext = OpenIDConnectContext
{ OpenIDConnectContext -> Maybe [Text]
openIDConnectContextAcrValues :: Maybe [Text]
, OpenIDConnectContext -> Maybe Text
openIDConnectContextDisplay :: Maybe Text
, OpenIDConnectContext -> Maybe Value
openIDConnectContextIdTokenHintClaims :: Maybe A.Value
, OpenIDConnectContext -> Maybe Text
openIDConnectContextLoginHint :: Maybe Text
, OpenIDConnectContext -> Maybe [Text]
openIDConnectContextUiLocales :: Maybe [Text]
} deriving (Int -> OpenIDConnectContext -> ShowS
[OpenIDConnectContext] -> ShowS
OpenIDConnectContext -> String
(Int -> OpenIDConnectContext -> ShowS)
-> (OpenIDConnectContext -> String)
-> ([OpenIDConnectContext] -> ShowS)
-> Show OpenIDConnectContext
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpenIDConnectContext] -> ShowS
$cshowList :: [OpenIDConnectContext] -> ShowS
show :: OpenIDConnectContext -> String
$cshow :: OpenIDConnectContext -> String
showsPrec :: Int -> OpenIDConnectContext -> ShowS
$cshowsPrec :: Int -> OpenIDConnectContext -> ShowS
P.Show, OpenIDConnectContext -> OpenIDConnectContext -> Bool
(OpenIDConnectContext -> OpenIDConnectContext -> Bool)
-> (OpenIDConnectContext -> OpenIDConnectContext -> Bool)
-> Eq OpenIDConnectContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpenIDConnectContext -> OpenIDConnectContext -> Bool
$c/= :: OpenIDConnectContext -> OpenIDConnectContext -> Bool
== :: OpenIDConnectContext -> OpenIDConnectContext -> Bool
$c== :: OpenIDConnectContext -> OpenIDConnectContext -> Bool
P.Eq, P.Typeable)
instance A.FromJSON OpenIDConnectContext where
parseJSON :: Value -> Parser OpenIDConnectContext
parseJSON = String
-> (Object -> Parser OpenIDConnectContext)
-> Value
-> Parser OpenIDConnectContext
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"OpenIDConnectContext" ((Object -> Parser OpenIDConnectContext)
-> Value -> Parser OpenIDConnectContext)
-> (Object -> Parser OpenIDConnectContext)
-> Value
-> Parser OpenIDConnectContext
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe [Text]
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe [Text]
-> OpenIDConnectContext
OpenIDConnectContext
(Maybe [Text]
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe [Text]
-> OpenIDConnectContext)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe [Text]
-> OpenIDConnectContext)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"acr_values")
Parser
(Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe [Text]
-> OpenIDConnectContext)
-> Parser (Maybe Text)
-> Parser
(Maybe Value -> Maybe Text -> Maybe [Text] -> OpenIDConnectContext)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"display")
Parser
(Maybe Value -> Maybe Text -> Maybe [Text] -> OpenIDConnectContext)
-> Parser (Maybe Value)
-> Parser (Maybe Text -> Maybe [Text] -> OpenIDConnectContext)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"id_token_hint_claims")
Parser (Maybe Text -> Maybe [Text] -> OpenIDConnectContext)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> OpenIDConnectContext)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"login_hint")
Parser (Maybe [Text] -> OpenIDConnectContext)
-> Parser (Maybe [Text]) -> Parser OpenIDConnectContext
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ui_locales")
instance A.ToJSON OpenIDConnectContext where
toJSON :: OpenIDConnectContext -> Value
toJSON OpenIDConnectContext {Maybe [Text]
Maybe Text
Maybe Value
openIDConnectContextUiLocales :: Maybe [Text]
openIDConnectContextLoginHint :: Maybe Text
openIDConnectContextIdTokenHintClaims :: Maybe Value
openIDConnectContextDisplay :: Maybe Text
openIDConnectContextAcrValues :: Maybe [Text]
openIDConnectContextUiLocales :: OpenIDConnectContext -> Maybe [Text]
openIDConnectContextLoginHint :: OpenIDConnectContext -> Maybe Text
openIDConnectContextIdTokenHintClaims :: OpenIDConnectContext -> Maybe Value
openIDConnectContextDisplay :: OpenIDConnectContext -> Maybe Text
openIDConnectContextAcrValues :: OpenIDConnectContext -> Maybe [Text]
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"acr_values" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
openIDConnectContextAcrValues
, Key
"display" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
openIDConnectContextDisplay
, Key
"id_token_hint_claims" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
openIDConnectContextIdTokenHintClaims
, Key
"login_hint" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
openIDConnectContextLoginHint
, Key
"ui_locales" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
openIDConnectContextUiLocales
]
mkOpenIDConnectContext
:: OpenIDConnectContext
mkOpenIDConnectContext :: OpenIDConnectContext
mkOpenIDConnectContext =
OpenIDConnectContext :: Maybe [Text]
-> Maybe Text
-> Maybe Value
-> Maybe Text
-> Maybe [Text]
-> OpenIDConnectContext
OpenIDConnectContext
{ openIDConnectContextAcrValues :: Maybe [Text]
openIDConnectContextAcrValues = Maybe [Text]
forall a. Maybe a
Nothing
, openIDConnectContextDisplay :: Maybe Text
openIDConnectContextDisplay = Maybe Text
forall a. Maybe a
Nothing
, openIDConnectContextIdTokenHintClaims :: Maybe Value
openIDConnectContextIdTokenHintClaims = Maybe Value
forall a. Maybe a
Nothing
, openIDConnectContextLoginHint :: Maybe Text
openIDConnectContextLoginHint = Maybe Text
forall a. Maybe a
Nothing
, openIDConnectContextUiLocales :: Maybe [Text]
openIDConnectContextUiLocales = Maybe [Text]
forall a. Maybe a
Nothing
}
data PluginConfig = PluginConfig
{ PluginConfig -> PluginConfigArgs
pluginConfigArgs :: PluginConfigArgs
, PluginConfig -> Text
pluginConfigDescription :: Text
, PluginConfig -> Maybe Text
pluginConfigDockerVersion :: Maybe Text
, PluginConfig -> Text
pluginConfigDocumentation :: Text
, PluginConfig -> [Text]
pluginConfigEntrypoint :: [Text]
, PluginConfig -> [PluginEnv]
pluginConfigEnv :: [PluginEnv]
, PluginConfig -> PluginConfigInterface
pluginConfigInterface :: PluginConfigInterface
, PluginConfig -> Bool
pluginConfigIpcHost :: Bool
, PluginConfig -> PluginConfigLinux
pluginConfigLinux :: PluginConfigLinux
, PluginConfig -> [PluginMount]
pluginConfigMounts :: [PluginMount]
, PluginConfig -> PluginConfigNetwork
pluginConfigNetwork :: PluginConfigNetwork
, PluginConfig -> Bool
pluginConfigPidHost :: Bool
, PluginConfig -> Text
pluginConfigPropagatedMount :: Text
, PluginConfig -> Maybe PluginConfigUser
pluginConfigUser :: Maybe PluginConfigUser
, PluginConfig -> Text
pluginConfigWorkDir :: Text
, PluginConfig -> Maybe PluginConfigRootfs
pluginConfigRootfs :: Maybe PluginConfigRootfs
} deriving (Int -> PluginConfig -> ShowS
[PluginConfig] -> ShowS
PluginConfig -> String
(Int -> PluginConfig -> ShowS)
-> (PluginConfig -> String)
-> ([PluginConfig] -> ShowS)
-> Show PluginConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfig] -> ShowS
$cshowList :: [PluginConfig] -> ShowS
show :: PluginConfig -> String
$cshow :: PluginConfig -> String
showsPrec :: Int -> PluginConfig -> ShowS
$cshowsPrec :: Int -> PluginConfig -> ShowS
P.Show, PluginConfig -> PluginConfig -> Bool
(PluginConfig -> PluginConfig -> Bool)
-> (PluginConfig -> PluginConfig -> Bool) -> Eq PluginConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfig -> PluginConfig -> Bool
$c/= :: PluginConfig -> PluginConfig -> Bool
== :: PluginConfig -> PluginConfig -> Bool
$c== :: PluginConfig -> PluginConfig -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfig where
parseJSON :: Value -> Parser PluginConfig
parseJSON = String
-> (Object -> Parser PluginConfig) -> Value -> Parser PluginConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfig" ((Object -> Parser PluginConfig) -> Value -> Parser PluginConfig)
-> (Object -> Parser PluginConfig) -> Value -> Parser PluginConfig
forall a b. (a -> b) -> a -> b
$ \Object
o ->
PluginConfigArgs
-> Text
-> Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig
PluginConfig
(PluginConfigArgs
-> Text
-> Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser PluginConfigArgs
-> Parser
(Text
-> Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser PluginConfigArgs
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Args")
Parser
(Text
-> Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser Text
-> Parser
(Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Description")
Parser
(Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser (Maybe Text)
-> Parser
(Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"DockerVersion")
Parser
(Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser Text
-> Parser
([Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Documentation")
Parser
([Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser [Text]
-> Parser
([PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Entrypoint")
Parser
([PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser [PluginEnv]
-> Parser
(PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [PluginEnv]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Env")
Parser
(PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser PluginConfigInterface
-> Parser
(Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser PluginConfigInterface
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Interface")
Parser
(Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser Bool
-> Parser
(PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"IpcHost")
Parser
(PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser PluginConfigLinux
-> Parser
([PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser PluginConfigLinux
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Linux")
Parser
([PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser [PluginMount]
-> Parser
(PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [PluginMount]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Mounts")
Parser
(PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser PluginConfigNetwork
-> Parser
(Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser PluginConfigNetwork
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Network")
Parser
(Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser Bool
-> Parser
(Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"PidHost")
Parser
(Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig)
-> Parser Text
-> Parser
(Maybe PluginConfigUser
-> Text -> Maybe PluginConfigRootfs -> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"PropagatedMount")
Parser
(Maybe PluginConfigUser
-> Text -> Maybe PluginConfigRootfs -> PluginConfig)
-> Parser (Maybe PluginConfigUser)
-> Parser (Text -> Maybe PluginConfigRootfs -> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe PluginConfigUser)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"User")
Parser (Text -> Maybe PluginConfigRootfs -> PluginConfig)
-> Parser Text -> Parser (Maybe PluginConfigRootfs -> PluginConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"WorkDir")
Parser (Maybe PluginConfigRootfs -> PluginConfig)
-> Parser (Maybe PluginConfigRootfs) -> Parser PluginConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe PluginConfigRootfs)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"rootfs")
instance A.ToJSON PluginConfig where
toJSON :: PluginConfig -> Value
toJSON PluginConfig {Bool
[Text]
[PluginMount]
[PluginEnv]
Maybe Text
Maybe PluginConfigUser
Maybe PluginConfigRootfs
Text
PluginConfigNetwork
PluginConfigLinux
PluginConfigInterface
PluginConfigArgs
pluginConfigRootfs :: Maybe PluginConfigRootfs
pluginConfigWorkDir :: Text
pluginConfigUser :: Maybe PluginConfigUser
pluginConfigPropagatedMount :: Text
pluginConfigPidHost :: Bool
pluginConfigNetwork :: PluginConfigNetwork
pluginConfigMounts :: [PluginMount]
pluginConfigLinux :: PluginConfigLinux
pluginConfigIpcHost :: Bool
pluginConfigInterface :: PluginConfigInterface
pluginConfigEnv :: [PluginEnv]
pluginConfigEntrypoint :: [Text]
pluginConfigDocumentation :: Text
pluginConfigDockerVersion :: Maybe Text
pluginConfigDescription :: Text
pluginConfigArgs :: PluginConfigArgs
pluginConfigRootfs :: PluginConfig -> Maybe PluginConfigRootfs
pluginConfigWorkDir :: PluginConfig -> Text
pluginConfigUser :: PluginConfig -> Maybe PluginConfigUser
pluginConfigPropagatedMount :: PluginConfig -> Text
pluginConfigPidHost :: PluginConfig -> Bool
pluginConfigNetwork :: PluginConfig -> PluginConfigNetwork
pluginConfigMounts :: PluginConfig -> [PluginMount]
pluginConfigLinux :: PluginConfig -> PluginConfigLinux
pluginConfigIpcHost :: PluginConfig -> Bool
pluginConfigInterface :: PluginConfig -> PluginConfigInterface
pluginConfigEnv :: PluginConfig -> [PluginEnv]
pluginConfigEntrypoint :: PluginConfig -> [Text]
pluginConfigDocumentation :: PluginConfig -> Text
pluginConfigDockerVersion :: PluginConfig -> Maybe Text
pluginConfigDescription :: PluginConfig -> Text
pluginConfigArgs :: PluginConfig -> PluginConfigArgs
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Args" Key -> PluginConfigArgs -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= PluginConfigArgs
pluginConfigArgs
, Key
"Description" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigDescription
, Key
"DockerVersion" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
pluginConfigDockerVersion
, Key
"Documentation" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigDocumentation
, Key
"Entrypoint" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginConfigEntrypoint
, Key
"Env" Key -> [PluginEnv] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PluginEnv]
pluginConfigEnv
, Key
"Interface" Key -> PluginConfigInterface -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= PluginConfigInterface
pluginConfigInterface
, Key
"IpcHost" Key -> Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
pluginConfigIpcHost
, Key
"Linux" Key -> PluginConfigLinux -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= PluginConfigLinux
pluginConfigLinux
, Key
"Mounts" Key -> [PluginMount] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PluginMount]
pluginConfigMounts
, Key
"Network" Key -> PluginConfigNetwork -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= PluginConfigNetwork
pluginConfigNetwork
, Key
"PidHost" Key -> Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
pluginConfigPidHost
, Key
"PropagatedMount" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigPropagatedMount
, Key
"User" Key -> Maybe PluginConfigUser -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe PluginConfigUser
pluginConfigUser
, Key
"WorkDir" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigWorkDir
, Key
"rootfs" Key -> Maybe PluginConfigRootfs -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe PluginConfigRootfs
pluginConfigRootfs
]
mkPluginConfig
:: PluginConfigArgs
-> Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Text
-> PluginConfig
mkPluginConfig :: PluginConfigArgs
-> Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Text
-> PluginConfig
mkPluginConfig PluginConfigArgs
pluginConfigArgs Text
pluginConfigDescription Text
pluginConfigDocumentation [Text]
pluginConfigEntrypoint [PluginEnv]
pluginConfigEnv PluginConfigInterface
pluginConfigInterface Bool
pluginConfigIpcHost PluginConfigLinux
pluginConfigLinux [PluginMount]
pluginConfigMounts PluginConfigNetwork
pluginConfigNetwork Bool
pluginConfigPidHost Text
pluginConfigPropagatedMount Text
pluginConfigWorkDir =
PluginConfig :: PluginConfigArgs
-> Text
-> Maybe Text
-> Text
-> [Text]
-> [PluginEnv]
-> PluginConfigInterface
-> Bool
-> PluginConfigLinux
-> [PluginMount]
-> PluginConfigNetwork
-> Bool
-> Text
-> Maybe PluginConfigUser
-> Text
-> Maybe PluginConfigRootfs
-> PluginConfig
PluginConfig
{ PluginConfigArgs
pluginConfigArgs :: PluginConfigArgs
pluginConfigArgs :: PluginConfigArgs
pluginConfigArgs
, Text
pluginConfigDescription :: Text
pluginConfigDescription :: Text
pluginConfigDescription
, pluginConfigDockerVersion :: Maybe Text
pluginConfigDockerVersion = Maybe Text
forall a. Maybe a
Nothing
, Text
pluginConfigDocumentation :: Text
pluginConfigDocumentation :: Text
pluginConfigDocumentation
, [Text]
pluginConfigEntrypoint :: [Text]
pluginConfigEntrypoint :: [Text]
pluginConfigEntrypoint
, [PluginEnv]
pluginConfigEnv :: [PluginEnv]
pluginConfigEnv :: [PluginEnv]
pluginConfigEnv
, PluginConfigInterface
pluginConfigInterface :: PluginConfigInterface
pluginConfigInterface :: PluginConfigInterface
pluginConfigInterface
, Bool
pluginConfigIpcHost :: Bool
pluginConfigIpcHost :: Bool
pluginConfigIpcHost
, PluginConfigLinux
pluginConfigLinux :: PluginConfigLinux
pluginConfigLinux :: PluginConfigLinux
pluginConfigLinux
, [PluginMount]
pluginConfigMounts :: [PluginMount]
pluginConfigMounts :: [PluginMount]
pluginConfigMounts
, PluginConfigNetwork
pluginConfigNetwork :: PluginConfigNetwork
pluginConfigNetwork :: PluginConfigNetwork
pluginConfigNetwork
, Bool
pluginConfigPidHost :: Bool
pluginConfigPidHost :: Bool
pluginConfigPidHost
, Text
pluginConfigPropagatedMount :: Text
pluginConfigPropagatedMount :: Text
pluginConfigPropagatedMount
, pluginConfigUser :: Maybe PluginConfigUser
pluginConfigUser = Maybe PluginConfigUser
forall a. Maybe a
Nothing
, Text
pluginConfigWorkDir :: Text
pluginConfigWorkDir :: Text
pluginConfigWorkDir
, pluginConfigRootfs :: Maybe PluginConfigRootfs
pluginConfigRootfs = Maybe PluginConfigRootfs
forall a. Maybe a
Nothing
}
data PluginConfigArgs = PluginConfigArgs
{ PluginConfigArgs -> Text
pluginConfigArgsDescription :: Text
, PluginConfigArgs -> Text
pluginConfigArgsName :: Text
, PluginConfigArgs -> [Text]
pluginConfigArgsSettable :: [Text]
, PluginConfigArgs -> [Text]
pluginConfigArgsValue :: [Text]
} deriving (Int -> PluginConfigArgs -> ShowS
[PluginConfigArgs] -> ShowS
PluginConfigArgs -> String
(Int -> PluginConfigArgs -> ShowS)
-> (PluginConfigArgs -> String)
-> ([PluginConfigArgs] -> ShowS)
-> Show PluginConfigArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfigArgs] -> ShowS
$cshowList :: [PluginConfigArgs] -> ShowS
show :: PluginConfigArgs -> String
$cshow :: PluginConfigArgs -> String
showsPrec :: Int -> PluginConfigArgs -> ShowS
$cshowsPrec :: Int -> PluginConfigArgs -> ShowS
P.Show, PluginConfigArgs -> PluginConfigArgs -> Bool
(PluginConfigArgs -> PluginConfigArgs -> Bool)
-> (PluginConfigArgs -> PluginConfigArgs -> Bool)
-> Eq PluginConfigArgs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfigArgs -> PluginConfigArgs -> Bool
$c/= :: PluginConfigArgs -> PluginConfigArgs -> Bool
== :: PluginConfigArgs -> PluginConfigArgs -> Bool
$c== :: PluginConfigArgs -> PluginConfigArgs -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfigArgs where
parseJSON :: Value -> Parser PluginConfigArgs
parseJSON = String
-> (Object -> Parser PluginConfigArgs)
-> Value
-> Parser PluginConfigArgs
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfigArgs" ((Object -> Parser PluginConfigArgs)
-> Value -> Parser PluginConfigArgs)
-> (Object -> Parser PluginConfigArgs)
-> Value
-> Parser PluginConfigArgs
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> Text -> [Text] -> [Text] -> PluginConfigArgs
PluginConfigArgs
(Text -> Text -> [Text] -> [Text] -> PluginConfigArgs)
-> Parser Text
-> Parser (Text -> [Text] -> [Text] -> PluginConfigArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Description")
Parser (Text -> [Text] -> [Text] -> PluginConfigArgs)
-> Parser Text -> Parser ([Text] -> [Text] -> PluginConfigArgs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Name")
Parser ([Text] -> [Text] -> PluginConfigArgs)
-> Parser [Text] -> Parser ([Text] -> PluginConfigArgs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Settable")
Parser ([Text] -> PluginConfigArgs)
-> Parser [Text] -> Parser PluginConfigArgs
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Value")
instance A.ToJSON PluginConfigArgs where
toJSON :: PluginConfigArgs -> Value
toJSON PluginConfigArgs {[Text]
Text
pluginConfigArgsValue :: [Text]
pluginConfigArgsSettable :: [Text]
pluginConfigArgsName :: Text
pluginConfigArgsDescription :: Text
pluginConfigArgsValue :: PluginConfigArgs -> [Text]
pluginConfigArgsSettable :: PluginConfigArgs -> [Text]
pluginConfigArgsName :: PluginConfigArgs -> Text
pluginConfigArgsDescription :: PluginConfigArgs -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Description" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigArgsDescription
, Key
"Name" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigArgsName
, Key
"Settable" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginConfigArgsSettable
, Key
"Value" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginConfigArgsValue
]
mkPluginConfigArgs
:: Text
-> Text
-> [Text]
-> [Text]
-> PluginConfigArgs
mkPluginConfigArgs :: Text -> Text -> [Text] -> [Text] -> PluginConfigArgs
mkPluginConfigArgs Text
pluginConfigArgsDescription Text
pluginConfigArgsName [Text]
pluginConfigArgsSettable [Text]
pluginConfigArgsValue =
PluginConfigArgs :: Text -> Text -> [Text] -> [Text] -> PluginConfigArgs
PluginConfigArgs
{ Text
pluginConfigArgsDescription :: Text
pluginConfigArgsDescription :: Text
pluginConfigArgsDescription
, Text
pluginConfigArgsName :: Text
pluginConfigArgsName :: Text
pluginConfigArgsName
, [Text]
pluginConfigArgsSettable :: [Text]
pluginConfigArgsSettable :: [Text]
pluginConfigArgsSettable
, [Text]
pluginConfigArgsValue :: [Text]
pluginConfigArgsValue :: [Text]
pluginConfigArgsValue
}
data PluginConfigInterface = PluginConfigInterface
{ PluginConfigInterface -> Maybe Text
pluginConfigInterfaceProtocolScheme :: Maybe Text
, PluginConfigInterface -> Text
pluginConfigInterfaceSocket :: Text
, PluginConfigInterface -> [PluginInterfaceType]
pluginConfigInterfaceTypes :: [PluginInterfaceType]
} deriving (Int -> PluginConfigInterface -> ShowS
[PluginConfigInterface] -> ShowS
PluginConfigInterface -> String
(Int -> PluginConfigInterface -> ShowS)
-> (PluginConfigInterface -> String)
-> ([PluginConfigInterface] -> ShowS)
-> Show PluginConfigInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfigInterface] -> ShowS
$cshowList :: [PluginConfigInterface] -> ShowS
show :: PluginConfigInterface -> String
$cshow :: PluginConfigInterface -> String
showsPrec :: Int -> PluginConfigInterface -> ShowS
$cshowsPrec :: Int -> PluginConfigInterface -> ShowS
P.Show, PluginConfigInterface -> PluginConfigInterface -> Bool
(PluginConfigInterface -> PluginConfigInterface -> Bool)
-> (PluginConfigInterface -> PluginConfigInterface -> Bool)
-> Eq PluginConfigInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfigInterface -> PluginConfigInterface -> Bool
$c/= :: PluginConfigInterface -> PluginConfigInterface -> Bool
== :: PluginConfigInterface -> PluginConfigInterface -> Bool
$c== :: PluginConfigInterface -> PluginConfigInterface -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfigInterface where
parseJSON :: Value -> Parser PluginConfigInterface
parseJSON = String
-> (Object -> Parser PluginConfigInterface)
-> Value
-> Parser PluginConfigInterface
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfigInterface" ((Object -> Parser PluginConfigInterface)
-> Value -> Parser PluginConfigInterface)
-> (Object -> Parser PluginConfigInterface)
-> Value
-> Parser PluginConfigInterface
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Text -> [PluginInterfaceType] -> PluginConfigInterface
PluginConfigInterface
(Maybe Text
-> Text -> [PluginInterfaceType] -> PluginConfigInterface)
-> Parser (Maybe Text)
-> Parser (Text -> [PluginInterfaceType] -> PluginConfigInterface)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"ProtocolScheme")
Parser (Text -> [PluginInterfaceType] -> PluginConfigInterface)
-> Parser Text
-> Parser ([PluginInterfaceType] -> PluginConfigInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Socket")
Parser ([PluginInterfaceType] -> PluginConfigInterface)
-> Parser [PluginInterfaceType] -> Parser PluginConfigInterface
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [PluginInterfaceType]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Types")
instance A.ToJSON PluginConfigInterface where
toJSON :: PluginConfigInterface -> Value
toJSON PluginConfigInterface {[PluginInterfaceType]
Maybe Text
Text
pluginConfigInterfaceTypes :: [PluginInterfaceType]
pluginConfigInterfaceSocket :: Text
pluginConfigInterfaceProtocolScheme :: Maybe Text
pluginConfigInterfaceTypes :: PluginConfigInterface -> [PluginInterfaceType]
pluginConfigInterfaceSocket :: PluginConfigInterface -> Text
pluginConfigInterfaceProtocolScheme :: PluginConfigInterface -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"ProtocolScheme" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
pluginConfigInterfaceProtocolScheme
, Key
"Socket" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigInterfaceSocket
, Key
"Types" Key -> [PluginInterfaceType] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PluginInterfaceType]
pluginConfigInterfaceTypes
]
mkPluginConfigInterface
:: Text
-> [PluginInterfaceType]
-> PluginConfigInterface
mkPluginConfigInterface :: Text -> [PluginInterfaceType] -> PluginConfigInterface
mkPluginConfigInterface Text
pluginConfigInterfaceSocket [PluginInterfaceType]
pluginConfigInterfaceTypes =
PluginConfigInterface :: Maybe Text
-> Text -> [PluginInterfaceType] -> PluginConfigInterface
PluginConfigInterface
{ pluginConfigInterfaceProtocolScheme :: Maybe Text
pluginConfigInterfaceProtocolScheme = Maybe Text
forall a. Maybe a
Nothing
, Text
pluginConfigInterfaceSocket :: Text
pluginConfigInterfaceSocket :: Text
pluginConfigInterfaceSocket
, [PluginInterfaceType]
pluginConfigInterfaceTypes :: [PluginInterfaceType]
pluginConfigInterfaceTypes :: [PluginInterfaceType]
pluginConfigInterfaceTypes
}
data PluginConfigLinux = PluginConfigLinux
{ PluginConfigLinux -> Bool
pluginConfigLinuxAllowAllDevices :: Bool
, PluginConfigLinux -> [Text]
pluginConfigLinuxCapabilities :: [Text]
, PluginConfigLinux -> [PluginDevice]
pluginConfigLinuxDevices :: [PluginDevice]
} deriving (Int -> PluginConfigLinux -> ShowS
[PluginConfigLinux] -> ShowS
PluginConfigLinux -> String
(Int -> PluginConfigLinux -> ShowS)
-> (PluginConfigLinux -> String)
-> ([PluginConfigLinux] -> ShowS)
-> Show PluginConfigLinux
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfigLinux] -> ShowS
$cshowList :: [PluginConfigLinux] -> ShowS
show :: PluginConfigLinux -> String
$cshow :: PluginConfigLinux -> String
showsPrec :: Int -> PluginConfigLinux -> ShowS
$cshowsPrec :: Int -> PluginConfigLinux -> ShowS
P.Show, PluginConfigLinux -> PluginConfigLinux -> Bool
(PluginConfigLinux -> PluginConfigLinux -> Bool)
-> (PluginConfigLinux -> PluginConfigLinux -> Bool)
-> Eq PluginConfigLinux
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfigLinux -> PluginConfigLinux -> Bool
$c/= :: PluginConfigLinux -> PluginConfigLinux -> Bool
== :: PluginConfigLinux -> PluginConfigLinux -> Bool
$c== :: PluginConfigLinux -> PluginConfigLinux -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfigLinux where
parseJSON :: Value -> Parser PluginConfigLinux
parseJSON = String
-> (Object -> Parser PluginConfigLinux)
-> Value
-> Parser PluginConfigLinux
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfigLinux" ((Object -> Parser PluginConfigLinux)
-> Value -> Parser PluginConfigLinux)
-> (Object -> Parser PluginConfigLinux)
-> Value
-> Parser PluginConfigLinux
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Bool -> [Text] -> [PluginDevice] -> PluginConfigLinux
PluginConfigLinux
(Bool -> [Text] -> [PluginDevice] -> PluginConfigLinux)
-> Parser Bool
-> Parser ([Text] -> [PluginDevice] -> PluginConfigLinux)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"AllowAllDevices")
Parser ([Text] -> [PluginDevice] -> PluginConfigLinux)
-> Parser [Text] -> Parser ([PluginDevice] -> PluginConfigLinux)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Capabilities")
Parser ([PluginDevice] -> PluginConfigLinux)
-> Parser [PluginDevice] -> Parser PluginConfigLinux
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [PluginDevice]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Devices")
instance A.ToJSON PluginConfigLinux where
toJSON :: PluginConfigLinux -> Value
toJSON PluginConfigLinux {Bool
[Text]
[PluginDevice]
pluginConfigLinuxDevices :: [PluginDevice]
pluginConfigLinuxCapabilities :: [Text]
pluginConfigLinuxAllowAllDevices :: Bool
pluginConfigLinuxDevices :: PluginConfigLinux -> [PluginDevice]
pluginConfigLinuxCapabilities :: PluginConfigLinux -> [Text]
pluginConfigLinuxAllowAllDevices :: PluginConfigLinux -> Bool
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"AllowAllDevices" Key -> Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Bool
pluginConfigLinuxAllowAllDevices
, Key
"Capabilities" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginConfigLinuxCapabilities
, Key
"Devices" Key -> [PluginDevice] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PluginDevice]
pluginConfigLinuxDevices
]
mkPluginConfigLinux
:: Bool
-> [Text]
-> [PluginDevice]
-> PluginConfigLinux
mkPluginConfigLinux :: Bool -> [Text] -> [PluginDevice] -> PluginConfigLinux
mkPluginConfigLinux Bool
pluginConfigLinuxAllowAllDevices [Text]
pluginConfigLinuxCapabilities [PluginDevice]
pluginConfigLinuxDevices =
PluginConfigLinux :: Bool -> [Text] -> [PluginDevice] -> PluginConfigLinux
PluginConfigLinux
{ Bool
pluginConfigLinuxAllowAllDevices :: Bool
pluginConfigLinuxAllowAllDevices :: Bool
pluginConfigLinuxAllowAllDevices
, [Text]
pluginConfigLinuxCapabilities :: [Text]
pluginConfigLinuxCapabilities :: [Text]
pluginConfigLinuxCapabilities
, [PluginDevice]
pluginConfigLinuxDevices :: [PluginDevice]
pluginConfigLinuxDevices :: [PluginDevice]
pluginConfigLinuxDevices
}
data PluginConfigNetwork = PluginConfigNetwork
{ PluginConfigNetwork -> Text
pluginConfigNetworkType :: Text
} deriving (Int -> PluginConfigNetwork -> ShowS
[PluginConfigNetwork] -> ShowS
PluginConfigNetwork -> String
(Int -> PluginConfigNetwork -> ShowS)
-> (PluginConfigNetwork -> String)
-> ([PluginConfigNetwork] -> ShowS)
-> Show PluginConfigNetwork
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfigNetwork] -> ShowS
$cshowList :: [PluginConfigNetwork] -> ShowS
show :: PluginConfigNetwork -> String
$cshow :: PluginConfigNetwork -> String
showsPrec :: Int -> PluginConfigNetwork -> ShowS
$cshowsPrec :: Int -> PluginConfigNetwork -> ShowS
P.Show, PluginConfigNetwork -> PluginConfigNetwork -> Bool
(PluginConfigNetwork -> PluginConfigNetwork -> Bool)
-> (PluginConfigNetwork -> PluginConfigNetwork -> Bool)
-> Eq PluginConfigNetwork
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfigNetwork -> PluginConfigNetwork -> Bool
$c/= :: PluginConfigNetwork -> PluginConfigNetwork -> Bool
== :: PluginConfigNetwork -> PluginConfigNetwork -> Bool
$c== :: PluginConfigNetwork -> PluginConfigNetwork -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfigNetwork where
parseJSON :: Value -> Parser PluginConfigNetwork
parseJSON = String
-> (Object -> Parser PluginConfigNetwork)
-> Value
-> Parser PluginConfigNetwork
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfigNetwork" ((Object -> Parser PluginConfigNetwork)
-> Value -> Parser PluginConfigNetwork)
-> (Object -> Parser PluginConfigNetwork)
-> Value
-> Parser PluginConfigNetwork
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> PluginConfigNetwork
PluginConfigNetwork
(Text -> PluginConfigNetwork)
-> Parser Text -> Parser PluginConfigNetwork
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Type")
instance A.ToJSON PluginConfigNetwork where
toJSON :: PluginConfigNetwork -> Value
toJSON PluginConfigNetwork {Text
pluginConfigNetworkType :: Text
pluginConfigNetworkType :: PluginConfigNetwork -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Type" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginConfigNetworkType
]
mkPluginConfigNetwork
:: Text
-> PluginConfigNetwork
mkPluginConfigNetwork :: Text -> PluginConfigNetwork
mkPluginConfigNetwork Text
pluginConfigNetworkType =
PluginConfigNetwork :: Text -> PluginConfigNetwork
PluginConfigNetwork
{ Text
pluginConfigNetworkType :: Text
pluginConfigNetworkType :: Text
pluginConfigNetworkType
}
data PluginConfigRootfs = PluginConfigRootfs
{ PluginConfigRootfs -> Maybe [Text]
pluginConfigRootfsDiffIds :: Maybe [Text]
, PluginConfigRootfs -> Maybe Text
pluginConfigRootfsType :: Maybe Text
} deriving (Int -> PluginConfigRootfs -> ShowS
[PluginConfigRootfs] -> ShowS
PluginConfigRootfs -> String
(Int -> PluginConfigRootfs -> ShowS)
-> (PluginConfigRootfs -> String)
-> ([PluginConfigRootfs] -> ShowS)
-> Show PluginConfigRootfs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfigRootfs] -> ShowS
$cshowList :: [PluginConfigRootfs] -> ShowS
show :: PluginConfigRootfs -> String
$cshow :: PluginConfigRootfs -> String
showsPrec :: Int -> PluginConfigRootfs -> ShowS
$cshowsPrec :: Int -> PluginConfigRootfs -> ShowS
P.Show, PluginConfigRootfs -> PluginConfigRootfs -> Bool
(PluginConfigRootfs -> PluginConfigRootfs -> Bool)
-> (PluginConfigRootfs -> PluginConfigRootfs -> Bool)
-> Eq PluginConfigRootfs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfigRootfs -> PluginConfigRootfs -> Bool
$c/= :: PluginConfigRootfs -> PluginConfigRootfs -> Bool
== :: PluginConfigRootfs -> PluginConfigRootfs -> Bool
$c== :: PluginConfigRootfs -> PluginConfigRootfs -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfigRootfs where
parseJSON :: Value -> Parser PluginConfigRootfs
parseJSON = String
-> (Object -> Parser PluginConfigRootfs)
-> Value
-> Parser PluginConfigRootfs
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfigRootfs" ((Object -> Parser PluginConfigRootfs)
-> Value -> Parser PluginConfigRootfs)
-> (Object -> Parser PluginConfigRootfs)
-> Value
-> Parser PluginConfigRootfs
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe [Text] -> Maybe Text -> PluginConfigRootfs
PluginConfigRootfs
(Maybe [Text] -> Maybe Text -> PluginConfigRootfs)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> PluginConfigRootfs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"diff_ids")
Parser (Maybe Text -> PluginConfigRootfs)
-> Parser (Maybe Text) -> Parser PluginConfigRootfs
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"type")
instance A.ToJSON PluginConfigRootfs where
toJSON :: PluginConfigRootfs -> Value
toJSON PluginConfigRootfs {Maybe [Text]
Maybe Text
pluginConfigRootfsType :: Maybe Text
pluginConfigRootfsDiffIds :: Maybe [Text]
pluginConfigRootfsType :: PluginConfigRootfs -> Maybe Text
pluginConfigRootfsDiffIds :: PluginConfigRootfs -> Maybe [Text]
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"diff_ids" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
pluginConfigRootfsDiffIds
, Key
"type" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
pluginConfigRootfsType
]
mkPluginConfigRootfs
:: PluginConfigRootfs
mkPluginConfigRootfs :: PluginConfigRootfs
mkPluginConfigRootfs =
PluginConfigRootfs :: Maybe [Text] -> Maybe Text -> PluginConfigRootfs
PluginConfigRootfs
{ pluginConfigRootfsDiffIds :: Maybe [Text]
pluginConfigRootfsDiffIds = Maybe [Text]
forall a. Maybe a
Nothing
, pluginConfigRootfsType :: Maybe Text
pluginConfigRootfsType = Maybe Text
forall a. Maybe a
Nothing
}
data PluginConfigUser = PluginConfigUser
{ PluginConfigUser -> Maybe Int
pluginConfigUserGid :: Maybe Int
, PluginConfigUser -> Maybe Int
pluginConfigUserUid :: Maybe Int
} deriving (Int -> PluginConfigUser -> ShowS
[PluginConfigUser] -> ShowS
PluginConfigUser -> String
(Int -> PluginConfigUser -> ShowS)
-> (PluginConfigUser -> String)
-> ([PluginConfigUser] -> ShowS)
-> Show PluginConfigUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginConfigUser] -> ShowS
$cshowList :: [PluginConfigUser] -> ShowS
show :: PluginConfigUser -> String
$cshow :: PluginConfigUser -> String
showsPrec :: Int -> PluginConfigUser -> ShowS
$cshowsPrec :: Int -> PluginConfigUser -> ShowS
P.Show, PluginConfigUser -> PluginConfigUser -> Bool
(PluginConfigUser -> PluginConfigUser -> Bool)
-> (PluginConfigUser -> PluginConfigUser -> Bool)
-> Eq PluginConfigUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginConfigUser -> PluginConfigUser -> Bool
$c/= :: PluginConfigUser -> PluginConfigUser -> Bool
== :: PluginConfigUser -> PluginConfigUser -> Bool
$c== :: PluginConfigUser -> PluginConfigUser -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginConfigUser where
parseJSON :: Value -> Parser PluginConfigUser
parseJSON = String
-> (Object -> Parser PluginConfigUser)
-> Value
-> Parser PluginConfigUser
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginConfigUser" ((Object -> Parser PluginConfigUser)
-> Value -> Parser PluginConfigUser)
-> (Object -> Parser PluginConfigUser)
-> Value
-> Parser PluginConfigUser
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Int -> Maybe Int -> PluginConfigUser
PluginConfigUser
(Maybe Int -> Maybe Int -> PluginConfigUser)
-> Parser (Maybe Int) -> Parser (Maybe Int -> PluginConfigUser)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"GID")
Parser (Maybe Int -> PluginConfigUser)
-> Parser (Maybe Int) -> Parser PluginConfigUser
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"UID")
instance A.ToJSON PluginConfigUser where
toJSON :: PluginConfigUser -> Value
toJSON PluginConfigUser {Maybe Int
pluginConfigUserUid :: Maybe Int
pluginConfigUserGid :: Maybe Int
pluginConfigUserUid :: PluginConfigUser -> Maybe Int
pluginConfigUserGid :: PluginConfigUser -> Maybe Int
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"GID" Key -> Maybe Int -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
pluginConfigUserGid
, Key
"UID" Key -> Maybe Int -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Int
pluginConfigUserUid
]
mkPluginConfigUser
:: PluginConfigUser
mkPluginConfigUser :: PluginConfigUser
mkPluginConfigUser =
PluginConfigUser :: Maybe Int -> Maybe Int -> PluginConfigUser
PluginConfigUser
{ pluginConfigUserGid :: Maybe Int
pluginConfigUserGid = Maybe Int
forall a. Maybe a
Nothing
, pluginConfigUserUid :: Maybe Int
pluginConfigUserUid = Maybe Int
forall a. Maybe a
Nothing
}
data PluginDevice = PluginDevice
{ PluginDevice -> Text
pluginDeviceDescription :: Text
, PluginDevice -> Text
pluginDeviceName :: Text
, PluginDevice -> Text
pluginDevicePath :: Text
, PluginDevice -> [Text]
pluginDeviceSettable :: [Text]
} deriving (Int -> PluginDevice -> ShowS
[PluginDevice] -> ShowS
PluginDevice -> String
(Int -> PluginDevice -> ShowS)
-> (PluginDevice -> String)
-> ([PluginDevice] -> ShowS)
-> Show PluginDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginDevice] -> ShowS
$cshowList :: [PluginDevice] -> ShowS
show :: PluginDevice -> String
$cshow :: PluginDevice -> String
showsPrec :: Int -> PluginDevice -> ShowS
$cshowsPrec :: Int -> PluginDevice -> ShowS
P.Show, PluginDevice -> PluginDevice -> Bool
(PluginDevice -> PluginDevice -> Bool)
-> (PluginDevice -> PluginDevice -> Bool) -> Eq PluginDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginDevice -> PluginDevice -> Bool
$c/= :: PluginDevice -> PluginDevice -> Bool
== :: PluginDevice -> PluginDevice -> Bool
$c== :: PluginDevice -> PluginDevice -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginDevice where
parseJSON :: Value -> Parser PluginDevice
parseJSON = String
-> (Object -> Parser PluginDevice) -> Value -> Parser PluginDevice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginDevice" ((Object -> Parser PluginDevice) -> Value -> Parser PluginDevice)
-> (Object -> Parser PluginDevice) -> Value -> Parser PluginDevice
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> Text -> Text -> [Text] -> PluginDevice
PluginDevice
(Text -> Text -> Text -> [Text] -> PluginDevice)
-> Parser Text -> Parser (Text -> Text -> [Text] -> PluginDevice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Description")
Parser (Text -> Text -> [Text] -> PluginDevice)
-> Parser Text -> Parser (Text -> [Text] -> PluginDevice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Name")
Parser (Text -> [Text] -> PluginDevice)
-> Parser Text -> Parser ([Text] -> PluginDevice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Path")
Parser ([Text] -> PluginDevice)
-> Parser [Text] -> Parser PluginDevice
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Settable")
instance A.ToJSON PluginDevice where
toJSON :: PluginDevice -> Value
toJSON PluginDevice {[Text]
Text
pluginDeviceSettable :: [Text]
pluginDevicePath :: Text
pluginDeviceName :: Text
pluginDeviceDescription :: Text
pluginDeviceSettable :: PluginDevice -> [Text]
pluginDevicePath :: PluginDevice -> Text
pluginDeviceName :: PluginDevice -> Text
pluginDeviceDescription :: PluginDevice -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Description" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginDeviceDescription
, Key
"Name" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginDeviceName
, Key
"Path" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginDevicePath
, Key
"Settable" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginDeviceSettable
]
mkPluginDevice
:: Text
-> Text
-> Text
-> [Text]
-> PluginDevice
mkPluginDevice :: Text -> Text -> Text -> [Text] -> PluginDevice
mkPluginDevice Text
pluginDeviceDescription Text
pluginDeviceName Text
pluginDevicePath [Text]
pluginDeviceSettable =
PluginDevice :: Text -> Text -> Text -> [Text] -> PluginDevice
PluginDevice
{ Text
pluginDeviceDescription :: Text
pluginDeviceDescription :: Text
pluginDeviceDescription
, Text
pluginDeviceName :: Text
pluginDeviceName :: Text
pluginDeviceName
, Text
pluginDevicePath :: Text
pluginDevicePath :: Text
pluginDevicePath
, [Text]
pluginDeviceSettable :: [Text]
pluginDeviceSettable :: [Text]
pluginDeviceSettable
}
data PluginEnv = PluginEnv
{ PluginEnv -> Text
pluginEnvDescription :: Text
, PluginEnv -> Text
pluginEnvName :: Text
, PluginEnv -> [Text]
pluginEnvSettable :: [Text]
, PluginEnv -> Text
pluginEnvValue :: Text
} deriving (Int -> PluginEnv -> ShowS
[PluginEnv] -> ShowS
PluginEnv -> String
(Int -> PluginEnv -> ShowS)
-> (PluginEnv -> String)
-> ([PluginEnv] -> ShowS)
-> Show PluginEnv
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginEnv] -> ShowS
$cshowList :: [PluginEnv] -> ShowS
show :: PluginEnv -> String
$cshow :: PluginEnv -> String
showsPrec :: Int -> PluginEnv -> ShowS
$cshowsPrec :: Int -> PluginEnv -> ShowS
P.Show, PluginEnv -> PluginEnv -> Bool
(PluginEnv -> PluginEnv -> Bool)
-> (PluginEnv -> PluginEnv -> Bool) -> Eq PluginEnv
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginEnv -> PluginEnv -> Bool
$c/= :: PluginEnv -> PluginEnv -> Bool
== :: PluginEnv -> PluginEnv -> Bool
$c== :: PluginEnv -> PluginEnv -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginEnv where
parseJSON :: Value -> Parser PluginEnv
parseJSON = String -> (Object -> Parser PluginEnv) -> Value -> Parser PluginEnv
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginEnv" ((Object -> Parser PluginEnv) -> Value -> Parser PluginEnv)
-> (Object -> Parser PluginEnv) -> Value -> Parser PluginEnv
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> Text -> [Text] -> Text -> PluginEnv
PluginEnv
(Text -> Text -> [Text] -> Text -> PluginEnv)
-> Parser Text -> Parser (Text -> [Text] -> Text -> PluginEnv)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Description")
Parser (Text -> [Text] -> Text -> PluginEnv)
-> Parser Text -> Parser ([Text] -> Text -> PluginEnv)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Name")
Parser ([Text] -> Text -> PluginEnv)
-> Parser [Text] -> Parser (Text -> PluginEnv)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Settable")
Parser (Text -> PluginEnv) -> Parser Text -> Parser PluginEnv
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Value")
instance A.ToJSON PluginEnv where
toJSON :: PluginEnv -> Value
toJSON PluginEnv {[Text]
Text
pluginEnvValue :: Text
pluginEnvSettable :: [Text]
pluginEnvName :: Text
pluginEnvDescription :: Text
pluginEnvValue :: PluginEnv -> Text
pluginEnvSettable :: PluginEnv -> [Text]
pluginEnvName :: PluginEnv -> Text
pluginEnvDescription :: PluginEnv -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Description" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginEnvDescription
, Key
"Name" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginEnvName
, Key
"Settable" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginEnvSettable
, Key
"Value" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginEnvValue
]
mkPluginEnv
:: Text
-> Text
-> [Text]
-> Text
-> PluginEnv
mkPluginEnv :: Text -> Text -> [Text] -> Text -> PluginEnv
mkPluginEnv Text
pluginEnvDescription Text
pluginEnvName [Text]
pluginEnvSettable Text
pluginEnvValue =
PluginEnv :: Text -> Text -> [Text] -> Text -> PluginEnv
PluginEnv
{ Text
pluginEnvDescription :: Text
pluginEnvDescription :: Text
pluginEnvDescription
, Text
pluginEnvName :: Text
pluginEnvName :: Text
pluginEnvName
, [Text]
pluginEnvSettable :: [Text]
pluginEnvSettable :: [Text]
pluginEnvSettable
, Text
pluginEnvValue :: Text
pluginEnvValue :: Text
pluginEnvValue
}
data PluginInterfaceType = PluginInterfaceType
{ PluginInterfaceType -> Text
pluginInterfaceTypeCapability :: Text
, PluginInterfaceType -> Text
pluginInterfaceTypePrefix :: Text
, PluginInterfaceType -> Text
pluginInterfaceTypeVersion :: Text
} deriving (Int -> PluginInterfaceType -> ShowS
[PluginInterfaceType] -> ShowS
PluginInterfaceType -> String
(Int -> PluginInterfaceType -> ShowS)
-> (PluginInterfaceType -> String)
-> ([PluginInterfaceType] -> ShowS)
-> Show PluginInterfaceType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginInterfaceType] -> ShowS
$cshowList :: [PluginInterfaceType] -> ShowS
show :: PluginInterfaceType -> String
$cshow :: PluginInterfaceType -> String
showsPrec :: Int -> PluginInterfaceType -> ShowS
$cshowsPrec :: Int -> PluginInterfaceType -> ShowS
P.Show, PluginInterfaceType -> PluginInterfaceType -> Bool
(PluginInterfaceType -> PluginInterfaceType -> Bool)
-> (PluginInterfaceType -> PluginInterfaceType -> Bool)
-> Eq PluginInterfaceType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginInterfaceType -> PluginInterfaceType -> Bool
$c/= :: PluginInterfaceType -> PluginInterfaceType -> Bool
== :: PluginInterfaceType -> PluginInterfaceType -> Bool
$c== :: PluginInterfaceType -> PluginInterfaceType -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginInterfaceType where
parseJSON :: Value -> Parser PluginInterfaceType
parseJSON = String
-> (Object -> Parser PluginInterfaceType)
-> Value
-> Parser PluginInterfaceType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginInterfaceType" ((Object -> Parser PluginInterfaceType)
-> Value -> Parser PluginInterfaceType)
-> (Object -> Parser PluginInterfaceType)
-> Value
-> Parser PluginInterfaceType
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text -> Text -> Text -> PluginInterfaceType
PluginInterfaceType
(Text -> Text -> Text -> PluginInterfaceType)
-> Parser Text -> Parser (Text -> Text -> PluginInterfaceType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Capability")
Parser (Text -> Text -> PluginInterfaceType)
-> Parser Text -> Parser (Text -> PluginInterfaceType)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Prefix")
Parser (Text -> PluginInterfaceType)
-> Parser Text -> Parser PluginInterfaceType
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Version")
instance A.ToJSON PluginInterfaceType where
toJSON :: PluginInterfaceType -> Value
toJSON PluginInterfaceType {Text
pluginInterfaceTypeVersion :: Text
pluginInterfaceTypePrefix :: Text
pluginInterfaceTypeCapability :: Text
pluginInterfaceTypeVersion :: PluginInterfaceType -> Text
pluginInterfaceTypePrefix :: PluginInterfaceType -> Text
pluginInterfaceTypeCapability :: PluginInterfaceType -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Capability" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginInterfaceTypeCapability
, Key
"Prefix" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginInterfaceTypePrefix
, Key
"Version" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginInterfaceTypeVersion
]
mkPluginInterfaceType
:: Text
-> Text
-> Text
-> PluginInterfaceType
mkPluginInterfaceType :: Text -> Text -> Text -> PluginInterfaceType
mkPluginInterfaceType Text
pluginInterfaceTypeCapability Text
pluginInterfaceTypePrefix Text
pluginInterfaceTypeVersion =
PluginInterfaceType :: Text -> Text -> Text -> PluginInterfaceType
PluginInterfaceType
{ Text
pluginInterfaceTypeCapability :: Text
pluginInterfaceTypeCapability :: Text
pluginInterfaceTypeCapability
, Text
pluginInterfaceTypePrefix :: Text
pluginInterfaceTypePrefix :: Text
pluginInterfaceTypePrefix
, Text
pluginInterfaceTypeVersion :: Text
pluginInterfaceTypeVersion :: Text
pluginInterfaceTypeVersion
}
data PluginMount = PluginMount
{ PluginMount -> Text
pluginMountDescription :: Text
, PluginMount -> Text
pluginMountDestination :: Text
, PluginMount -> Text
pluginMountName :: Text
, PluginMount -> [Text]
pluginMountOptions :: [Text]
, PluginMount -> [Text]
pluginMountSettable :: [Text]
, PluginMount -> Text
pluginMountSource :: Text
, PluginMount -> Text
pluginMountType :: Text
} deriving (Int -> PluginMount -> ShowS
[PluginMount] -> ShowS
PluginMount -> String
(Int -> PluginMount -> ShowS)
-> (PluginMount -> String)
-> ([PluginMount] -> ShowS)
-> Show PluginMount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginMount] -> ShowS
$cshowList :: [PluginMount] -> ShowS
show :: PluginMount -> String
$cshow :: PluginMount -> String
showsPrec :: Int -> PluginMount -> ShowS
$cshowsPrec :: Int -> PluginMount -> ShowS
P.Show, PluginMount -> PluginMount -> Bool
(PluginMount -> PluginMount -> Bool)
-> (PluginMount -> PluginMount -> Bool) -> Eq PluginMount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginMount -> PluginMount -> Bool
$c/= :: PluginMount -> PluginMount -> Bool
== :: PluginMount -> PluginMount -> Bool
$c== :: PluginMount -> PluginMount -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginMount where
parseJSON :: Value -> Parser PluginMount
parseJSON = String
-> (Object -> Parser PluginMount) -> Value -> Parser PluginMount
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginMount" ((Object -> Parser PluginMount) -> Value -> Parser PluginMount)
-> (Object -> Parser PluginMount) -> Value -> Parser PluginMount
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text
-> Text -> Text -> [Text] -> [Text] -> Text -> Text -> PluginMount
PluginMount
(Text
-> Text -> Text -> [Text] -> [Text] -> Text -> Text -> PluginMount)
-> Parser Text
-> Parser
(Text -> Text -> [Text] -> [Text] -> Text -> Text -> PluginMount)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Description")
Parser
(Text -> Text -> [Text] -> [Text] -> Text -> Text -> PluginMount)
-> Parser Text
-> Parser (Text -> [Text] -> [Text] -> Text -> Text -> PluginMount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Destination")
Parser (Text -> [Text] -> [Text] -> Text -> Text -> PluginMount)
-> Parser Text
-> Parser ([Text] -> [Text] -> Text -> Text -> PluginMount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Name")
Parser ([Text] -> [Text] -> Text -> Text -> PluginMount)
-> Parser [Text] -> Parser ([Text] -> Text -> Text -> PluginMount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Options")
Parser ([Text] -> Text -> Text -> PluginMount)
-> Parser [Text] -> Parser (Text -> Text -> PluginMount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Settable")
Parser (Text -> Text -> PluginMount)
-> Parser Text -> Parser (Text -> PluginMount)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Source")
Parser (Text -> PluginMount) -> Parser Text -> Parser PluginMount
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Type")
instance A.ToJSON PluginMount where
toJSON :: PluginMount -> Value
toJSON PluginMount {[Text]
Text
pluginMountType :: Text
pluginMountSource :: Text
pluginMountSettable :: [Text]
pluginMountOptions :: [Text]
pluginMountName :: Text
pluginMountDestination :: Text
pluginMountDescription :: Text
pluginMountType :: PluginMount -> Text
pluginMountSource :: PluginMount -> Text
pluginMountSettable :: PluginMount -> [Text]
pluginMountOptions :: PluginMount -> [Text]
pluginMountName :: PluginMount -> Text
pluginMountDestination :: PluginMount -> Text
pluginMountDescription :: PluginMount -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Description" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginMountDescription
, Key
"Destination" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginMountDestination
, Key
"Name" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginMountName
, Key
"Options" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginMountOptions
, Key
"Settable" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginMountSettable
, Key
"Source" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginMountSource
, Key
"Type" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
pluginMountType
]
mkPluginMount
:: Text
-> Text
-> Text
-> [Text]
-> [Text]
-> Text
-> Text
-> PluginMount
mkPluginMount :: Text
-> Text -> Text -> [Text] -> [Text] -> Text -> Text -> PluginMount
mkPluginMount Text
pluginMountDescription Text
pluginMountDestination Text
pluginMountName [Text]
pluginMountOptions [Text]
pluginMountSettable Text
pluginMountSource Text
pluginMountType =
PluginMount :: Text
-> Text -> Text -> [Text] -> [Text] -> Text -> Text -> PluginMount
PluginMount
{ Text
pluginMountDescription :: Text
pluginMountDescription :: Text
pluginMountDescription
, Text
pluginMountDestination :: Text
pluginMountDestination :: Text
pluginMountDestination
, Text
pluginMountName :: Text
pluginMountName :: Text
pluginMountName
, [Text]
pluginMountOptions :: [Text]
pluginMountOptions :: [Text]
pluginMountOptions
, [Text]
pluginMountSettable :: [Text]
pluginMountSettable :: [Text]
pluginMountSettable
, Text
pluginMountSource :: Text
pluginMountSource :: Text
pluginMountSource
, Text
pluginMountType :: Text
pluginMountType :: Text
pluginMountType
}
data PluginSettings = PluginSettings
{ PluginSettings -> [Text]
pluginSettingsArgs :: [Text]
, PluginSettings -> [PluginDevice]
pluginSettingsDevices :: [PluginDevice]
, PluginSettings -> [Text]
pluginSettingsEnv :: [Text]
, PluginSettings -> [PluginMount]
pluginSettingsMounts :: [PluginMount]
} deriving (Int -> PluginSettings -> ShowS
[PluginSettings] -> ShowS
PluginSettings -> String
(Int -> PluginSettings -> ShowS)
-> (PluginSettings -> String)
-> ([PluginSettings] -> ShowS)
-> Show PluginSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PluginSettings] -> ShowS
$cshowList :: [PluginSettings] -> ShowS
show :: PluginSettings -> String
$cshow :: PluginSettings -> String
showsPrec :: Int -> PluginSettings -> ShowS
$cshowsPrec :: Int -> PluginSettings -> ShowS
P.Show, PluginSettings -> PluginSettings -> Bool
(PluginSettings -> PluginSettings -> Bool)
-> (PluginSettings -> PluginSettings -> Bool) -> Eq PluginSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginSettings -> PluginSettings -> Bool
$c/= :: PluginSettings -> PluginSettings -> Bool
== :: PluginSettings -> PluginSettings -> Bool
$c== :: PluginSettings -> PluginSettings -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PluginSettings where
parseJSON :: Value -> Parser PluginSettings
parseJSON = String
-> (Object -> Parser PluginSettings)
-> Value
-> Parser PluginSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PluginSettings" ((Object -> Parser PluginSettings)
-> Value -> Parser PluginSettings)
-> (Object -> Parser PluginSettings)
-> Value
-> Parser PluginSettings
forall a b. (a -> b) -> a -> b
$ \Object
o ->
[Text]
-> [PluginDevice] -> [Text] -> [PluginMount] -> PluginSettings
PluginSettings
([Text]
-> [PluginDevice] -> [Text] -> [PluginMount] -> PluginSettings)
-> Parser [Text]
-> Parser
([PluginDevice] -> [Text] -> [PluginMount] -> PluginSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Args")
Parser
([PluginDevice] -> [Text] -> [PluginMount] -> PluginSettings)
-> Parser [PluginDevice]
-> Parser ([Text] -> [PluginMount] -> PluginSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [PluginDevice]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Devices")
Parser ([Text] -> [PluginMount] -> PluginSettings)
-> Parser [Text] -> Parser ([PluginMount] -> PluginSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Env")
Parser ([PluginMount] -> PluginSettings)
-> Parser [PluginMount] -> Parser PluginSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [PluginMount]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Mounts")
instance A.ToJSON PluginSettings where
toJSON :: PluginSettings -> Value
toJSON PluginSettings {[Text]
[PluginMount]
[PluginDevice]
pluginSettingsMounts :: [PluginMount]
pluginSettingsEnv :: [Text]
pluginSettingsDevices :: [PluginDevice]
pluginSettingsArgs :: [Text]
pluginSettingsMounts :: PluginSettings -> [PluginMount]
pluginSettingsEnv :: PluginSettings -> [Text]
pluginSettingsDevices :: PluginSettings -> [PluginDevice]
pluginSettingsArgs :: PluginSettings -> [Text]
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"Args" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginSettingsArgs
, Key
"Devices" Key -> [PluginDevice] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PluginDevice]
pluginSettingsDevices
, Key
"Env" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
pluginSettingsEnv
, Key
"Mounts" Key -> [PluginMount] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [PluginMount]
pluginSettingsMounts
]
mkPluginSettings
:: [Text]
-> [PluginDevice]
-> [Text]
-> [PluginMount]
-> PluginSettings
mkPluginSettings :: [Text]
-> [PluginDevice] -> [Text] -> [PluginMount] -> PluginSettings
mkPluginSettings [Text]
pluginSettingsArgs [PluginDevice]
pluginSettingsDevices [Text]
pluginSettingsEnv [PluginMount]
pluginSettingsMounts =
PluginSettings :: [Text]
-> [PluginDevice] -> [Text] -> [PluginMount] -> PluginSettings
PluginSettings
{ [Text]
pluginSettingsArgs :: [Text]
pluginSettingsArgs :: [Text]
pluginSettingsArgs
, [PluginDevice]
pluginSettingsDevices :: [PluginDevice]
pluginSettingsDevices :: [PluginDevice]
pluginSettingsDevices
, [Text]
pluginSettingsEnv :: [Text]
pluginSettingsEnv :: [Text]
pluginSettingsEnv
, [PluginMount]
pluginSettingsMounts :: [PluginMount]
pluginSettingsMounts :: [PluginMount]
pluginSettingsMounts
}
data PreviousConsentSession = PreviousConsentSession
{ PreviousConsentSession -> Maybe ConsentRequest
previousConsentSessionConsentRequest :: Maybe ConsentRequest
, PreviousConsentSession -> Maybe [Text]
previousConsentSessionGrantAccessTokenAudience :: Maybe [Text]
, PreviousConsentSession -> Maybe [Text]
previousConsentSessionGrantScope :: Maybe [Text]
, PreviousConsentSession -> Maybe DateTime
previousConsentSessionHandledAt :: Maybe DateTime
, PreviousConsentSession -> Maybe Bool
previousConsentSessionRemember :: Maybe Bool
, PreviousConsentSession -> Maybe Integer
previousConsentSessionRememberFor :: Maybe Integer
, PreviousConsentSession -> Maybe ConsentRequestSession
previousConsentSessionSession :: Maybe ConsentRequestSession
} deriving (Int -> PreviousConsentSession -> ShowS
[PreviousConsentSession] -> ShowS
PreviousConsentSession -> String
(Int -> PreviousConsentSession -> ShowS)
-> (PreviousConsentSession -> String)
-> ([PreviousConsentSession] -> ShowS)
-> Show PreviousConsentSession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PreviousConsentSession] -> ShowS
$cshowList :: [PreviousConsentSession] -> ShowS
show :: PreviousConsentSession -> String
$cshow :: PreviousConsentSession -> String
showsPrec :: Int -> PreviousConsentSession -> ShowS
$cshowsPrec :: Int -> PreviousConsentSession -> ShowS
P.Show, PreviousConsentSession -> PreviousConsentSession -> Bool
(PreviousConsentSession -> PreviousConsentSession -> Bool)
-> (PreviousConsentSession -> PreviousConsentSession -> Bool)
-> Eq PreviousConsentSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PreviousConsentSession -> PreviousConsentSession -> Bool
$c/= :: PreviousConsentSession -> PreviousConsentSession -> Bool
== :: PreviousConsentSession -> PreviousConsentSession -> Bool
$c== :: PreviousConsentSession -> PreviousConsentSession -> Bool
P.Eq, P.Typeable)
instance A.FromJSON PreviousConsentSession where
parseJSON :: Value -> Parser PreviousConsentSession
parseJSON = String
-> (Object -> Parser PreviousConsentSession)
-> Value
-> Parser PreviousConsentSession
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"PreviousConsentSession" ((Object -> Parser PreviousConsentSession)
-> Value -> Parser PreviousConsentSession)
-> (Object -> Parser PreviousConsentSession)
-> Value
-> Parser PreviousConsentSession
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe ConsentRequest
-> Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession
PreviousConsentSession
(Maybe ConsentRequest
-> Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
-> Parser (Maybe ConsentRequest)
-> Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe ConsentRequest)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"consent_request")
Parser
(Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grant_access_token_audience")
Parser
(Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
-> Parser (Maybe [Text])
-> Parser
(Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grant_scope")
Parser
(Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
-> Parser (Maybe DateTime)
-> Parser
(Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe DateTime)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"handled_at")
Parser
(Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession)
-> Parser (Maybe Bool)
-> Parser
(Maybe Integer
-> Maybe ConsentRequestSession -> PreviousConsentSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remember")
Parser
(Maybe Integer
-> Maybe ConsentRequestSession -> PreviousConsentSession)
-> Parser (Maybe Integer)
-> Parser (Maybe ConsentRequestSession -> PreviousConsentSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"remember_for")
Parser (Maybe ConsentRequestSession -> PreviousConsentSession)
-> Parser (Maybe ConsentRequestSession)
-> Parser PreviousConsentSession
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe ConsentRequestSession)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"session")
instance A.ToJSON PreviousConsentSession where
toJSON :: PreviousConsentSession -> Value
toJSON PreviousConsentSession {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe DateTime
Maybe ConsentRequestSession
Maybe ConsentRequest
previousConsentSessionSession :: Maybe ConsentRequestSession
previousConsentSessionRememberFor :: Maybe Integer
previousConsentSessionRemember :: Maybe Bool
previousConsentSessionHandledAt :: Maybe DateTime
previousConsentSessionGrantScope :: Maybe [Text]
previousConsentSessionGrantAccessTokenAudience :: Maybe [Text]
previousConsentSessionConsentRequest :: Maybe ConsentRequest
previousConsentSessionSession :: PreviousConsentSession -> Maybe ConsentRequestSession
previousConsentSessionRememberFor :: PreviousConsentSession -> Maybe Integer
previousConsentSessionRemember :: PreviousConsentSession -> Maybe Bool
previousConsentSessionHandledAt :: PreviousConsentSession -> Maybe DateTime
previousConsentSessionGrantScope :: PreviousConsentSession -> Maybe [Text]
previousConsentSessionGrantAccessTokenAudience :: PreviousConsentSession -> Maybe [Text]
previousConsentSessionConsentRequest :: PreviousConsentSession -> Maybe ConsentRequest
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"consent_request" Key -> Maybe ConsentRequest -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe ConsentRequest
previousConsentSessionConsentRequest
, Key
"grant_access_token_audience" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
previousConsentSessionGrantAccessTokenAudience
, Key
"grant_scope" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
previousConsentSessionGrantScope
, Key
"handled_at" Key -> Maybe DateTime -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe DateTime
previousConsentSessionHandledAt
, Key
"remember" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
previousConsentSessionRemember
, Key
"remember_for" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
previousConsentSessionRememberFor
, Key
"session" Key -> Maybe ConsentRequestSession -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe ConsentRequestSession
previousConsentSessionSession
]
mkPreviousConsentSession
:: PreviousConsentSession
mkPreviousConsentSession :: PreviousConsentSession
mkPreviousConsentSession =
PreviousConsentSession :: Maybe ConsentRequest
-> Maybe [Text]
-> Maybe [Text]
-> Maybe DateTime
-> Maybe Bool
-> Maybe Integer
-> Maybe ConsentRequestSession
-> PreviousConsentSession
PreviousConsentSession
{ previousConsentSessionConsentRequest :: Maybe ConsentRequest
previousConsentSessionConsentRequest = Maybe ConsentRequest
forall a. Maybe a
Nothing
, previousConsentSessionGrantAccessTokenAudience :: Maybe [Text]
previousConsentSessionGrantAccessTokenAudience = Maybe [Text]
forall a. Maybe a
Nothing
, previousConsentSessionGrantScope :: Maybe [Text]
previousConsentSessionGrantScope = Maybe [Text]
forall a. Maybe a
Nothing
, previousConsentSessionHandledAt :: Maybe DateTime
previousConsentSessionHandledAt = Maybe DateTime
forall a. Maybe a
Nothing
, previousConsentSessionRemember :: Maybe Bool
previousConsentSessionRemember = Maybe Bool
forall a. Maybe a
Nothing
, previousConsentSessionRememberFor :: Maybe Integer
previousConsentSessionRememberFor = Maybe Integer
forall a. Maybe a
Nothing
, previousConsentSessionSession :: Maybe ConsentRequestSession
previousConsentSessionSession = Maybe ConsentRequestSession
forall a. Maybe a
Nothing
}
data RejectRequest = RejectRequest
{ RejectRequest -> Maybe Text
rejectRequestError :: Maybe Text
, RejectRequest -> Maybe Text
rejectRequestErrorDebug :: Maybe Text
, RejectRequest -> Maybe Text
rejectRequestErrorDescription :: Maybe Text
, RejectRequest -> Maybe Text
rejectRequestErrorHint :: Maybe Text
, RejectRequest -> Maybe Integer
rejectRequestStatusCode :: Maybe Integer
} deriving (Int -> RejectRequest -> ShowS
[RejectRequest] -> ShowS
RejectRequest -> String
(Int -> RejectRequest -> ShowS)
-> (RejectRequest -> String)
-> ([RejectRequest] -> ShowS)
-> Show RejectRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RejectRequest] -> ShowS
$cshowList :: [RejectRequest] -> ShowS
show :: RejectRequest -> String
$cshow :: RejectRequest -> String
showsPrec :: Int -> RejectRequest -> ShowS
$cshowsPrec :: Int -> RejectRequest -> ShowS
P.Show, RejectRequest -> RejectRequest -> Bool
(RejectRequest -> RejectRequest -> Bool)
-> (RejectRequest -> RejectRequest -> Bool) -> Eq RejectRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RejectRequest -> RejectRequest -> Bool
$c/= :: RejectRequest -> RejectRequest -> Bool
== :: RejectRequest -> RejectRequest -> Bool
$c== :: RejectRequest -> RejectRequest -> Bool
P.Eq, P.Typeable)
instance A.FromJSON RejectRequest where
parseJSON :: Value -> Parser RejectRequest
parseJSON = String
-> (Object -> Parser RejectRequest)
-> Value
-> Parser RejectRequest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"RejectRequest" ((Object -> Parser RejectRequest) -> Value -> Parser RejectRequest)
-> (Object -> Parser RejectRequest)
-> Value
-> Parser RejectRequest
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> RejectRequest
RejectRequest
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> RejectRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error_debug")
Parser (Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error_description")
Parser (Maybe Text -> Maybe Integer -> RejectRequest)
-> Parser (Maybe Text) -> Parser (Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"error_hint")
Parser (Maybe Integer -> RejectRequest)
-> Parser (Maybe Integer) -> Parser RejectRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"status_code")
instance A.ToJSON RejectRequest where
toJSON :: RejectRequest -> Value
toJSON RejectRequest {Maybe Integer
Maybe Text
rejectRequestStatusCode :: Maybe Integer
rejectRequestErrorHint :: Maybe Text
rejectRequestErrorDescription :: Maybe Text
rejectRequestErrorDebug :: Maybe Text
rejectRequestError :: Maybe Text
rejectRequestStatusCode :: RejectRequest -> Maybe Integer
rejectRequestErrorHint :: RejectRequest -> Maybe Text
rejectRequestErrorDescription :: RejectRequest -> Maybe Text
rejectRequestErrorDebug :: RejectRequest -> Maybe Text
rejectRequestError :: RejectRequest -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"error" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
rejectRequestError
, Key
"error_debug" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
rejectRequestErrorDebug
, Key
"error_description" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
rejectRequestErrorDescription
, Key
"error_hint" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
rejectRequestErrorHint
, Key
"status_code" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
rejectRequestStatusCode
]
instance WH.FromForm RejectRequest where
fromForm :: Form -> Either Text RejectRequest
fromForm Form
f =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> RejectRequest
RejectRequest
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> RejectRequest)
-> Either Text (Maybe Text)
-> Either
Text
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Text -> Form -> Either Text (Maybe Text)
forall v.
FromHttpApiData v =>
Text -> Form -> Either Text (Maybe v)
WH.parseMaybe Text
"error" Form
f)
Either
Text
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
-> Either Text (Maybe Text)
-> Either
Text (Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Text -> Form -> Either Text (Maybe Text)
forall v.
FromHttpApiData v =>
Text -> Form -> Either Text (Maybe v)
WH.parseMaybe Text
"error_debug" Form
f)
Either
Text (Maybe Text -> Maybe Text -> Maybe Integer -> RejectRequest)
-> Either Text (Maybe Text)
-> Either Text (Maybe Text -> Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Text -> Form -> Either Text (Maybe Text)
forall v.
FromHttpApiData v =>
Text -> Form -> Either Text (Maybe v)
WH.parseMaybe Text
"error_description" Form
f)
Either Text (Maybe Text -> Maybe Integer -> RejectRequest)
-> Either Text (Maybe Text)
-> Either Text (Maybe Integer -> RejectRequest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Text -> Form -> Either Text (Maybe Text)
forall v.
FromHttpApiData v =>
Text -> Form -> Either Text (Maybe v)
WH.parseMaybe Text
"error_hint" Form
f)
Either Text (Maybe Integer -> RejectRequest)
-> Either Text (Maybe Integer) -> Either Text RejectRequest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Text -> Form -> Either Text (Maybe Integer)
forall v.
FromHttpApiData v =>
Text -> Form -> Either Text (Maybe v)
WH.parseMaybe Text
"status_code" Form
f)
instance WH.ToForm RejectRequest where
toForm :: RejectRequest -> Form
toForm RejectRequest {Maybe Integer
Maybe Text
rejectRequestStatusCode :: Maybe Integer
rejectRequestErrorHint :: Maybe Text
rejectRequestErrorDescription :: Maybe Text
rejectRequestErrorDebug :: Maybe Text
rejectRequestError :: Maybe Text
rejectRequestStatusCode :: RejectRequest -> Maybe Integer
rejectRequestErrorHint :: RejectRequest -> Maybe Text
rejectRequestErrorDescription :: RejectRequest -> Maybe Text
rejectRequestErrorDebug :: RejectRequest -> Maybe Text
rejectRequestError :: RejectRequest -> Maybe Text
..} =
HashMap Text [Text] -> Form
WH.Form (HashMap Text [Text] -> Form) -> HashMap Text [Text] -> Form
forall a b. (a -> b) -> a -> b
$ [(Text, [Text])] -> HashMap Text [Text]
forall k v. (Eq k, Hashable k) => [(k, v)] -> HashMap k v
HM.fromList ([(Text, [Text])] -> HashMap Text [Text])
-> [(Text, [Text])] -> HashMap Text [Text]
forall a b. (a -> b) -> a -> b
$ [Maybe (Text, [Text])] -> [(Text, [Text])]
forall a. [Maybe a] -> [a]
P.catMaybes ([Maybe (Text, [Text])] -> [(Text, [Text])])
-> [Maybe (Text, [Text])] -> [(Text, [Text])]
forall a b. (a -> b) -> a -> b
$
[ Text -> Maybe Text -> Maybe (Text, [Text])
forall a (f :: * -> *) t.
(ToHttpApiData a, Functor f) =>
t -> f a -> f (t, [Text])
_toFormItem Text
"error" (Maybe Text
rejectRequestError)
, Text -> Maybe Text -> Maybe (Text, [Text])
forall a (f :: * -> *) t.
(ToHttpApiData a, Functor f) =>
t -> f a -> f (t, [Text])
_toFormItem Text
"error_debug" (Maybe Text
rejectRequestErrorDebug)
, Text -> Maybe Text -> Maybe (Text, [Text])
forall a (f :: * -> *) t.
(ToHttpApiData a, Functor f) =>
t -> f a -> f (t, [Text])
_toFormItem Text
"error_description" (Maybe Text
rejectRequestErrorDescription)
, Text -> Maybe Text -> Maybe (Text, [Text])
forall a (f :: * -> *) t.
(ToHttpApiData a, Functor f) =>
t -> f a -> f (t, [Text])
_toFormItem Text
"error_hint" (Maybe Text
rejectRequestErrorHint)
, Text -> Maybe Integer -> Maybe (Text, [Text])
forall a (f :: * -> *) t.
(ToHttpApiData a, Functor f) =>
t -> f a -> f (t, [Text])
_toFormItem Text
"status_code" (Maybe Integer
rejectRequestStatusCode)
]
mkRejectRequest
:: RejectRequest
mkRejectRequest :: RejectRequest
mkRejectRequest =
RejectRequest :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> RejectRequest
RejectRequest
{ rejectRequestError :: Maybe Text
rejectRequestError = Maybe Text
forall a. Maybe a
Nothing
, rejectRequestErrorDebug :: Maybe Text
rejectRequestErrorDebug = Maybe Text
forall a. Maybe a
Nothing
, rejectRequestErrorDescription :: Maybe Text
rejectRequestErrorDescription = Maybe Text
forall a. Maybe a
Nothing
, rejectRequestErrorHint :: Maybe Text
rejectRequestErrorHint = Maybe Text
forall a. Maybe a
Nothing
, rejectRequestStatusCode :: Maybe Integer
rejectRequestStatusCode = Maybe Integer
forall a. Maybe a
Nothing
}
data UserinfoResponse = UserinfoResponse
{ UserinfoResponse -> Maybe Text
userinfoResponseBirthdate :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseEmail :: Maybe Text
, UserinfoResponse -> Maybe Bool
userinfoResponseEmailVerified :: Maybe Bool
, UserinfoResponse -> Maybe Text
userinfoResponseFamilyName :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseGender :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseGivenName :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseLocale :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseMiddleName :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseName :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseNickname :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponsePhoneNumber :: Maybe Text
, UserinfoResponse -> Maybe Bool
userinfoResponsePhoneNumberVerified :: Maybe Bool
, UserinfoResponse -> Maybe Text
userinfoResponsePicture :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponsePreferredUsername :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseProfile :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseSub :: Maybe Text
, UserinfoResponse -> Maybe Integer
userinfoResponseUpdatedAt :: Maybe Integer
, UserinfoResponse -> Maybe Text
userinfoResponseWebsite :: Maybe Text
, UserinfoResponse -> Maybe Text
userinfoResponseZoneinfo :: Maybe Text
} deriving (Int -> UserinfoResponse -> ShowS
[UserinfoResponse] -> ShowS
UserinfoResponse -> String
(Int -> UserinfoResponse -> ShowS)
-> (UserinfoResponse -> String)
-> ([UserinfoResponse] -> ShowS)
-> Show UserinfoResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserinfoResponse] -> ShowS
$cshowList :: [UserinfoResponse] -> ShowS
show :: UserinfoResponse -> String
$cshow :: UserinfoResponse -> String
showsPrec :: Int -> UserinfoResponse -> ShowS
$cshowsPrec :: Int -> UserinfoResponse -> ShowS
P.Show, UserinfoResponse -> UserinfoResponse -> Bool
(UserinfoResponse -> UserinfoResponse -> Bool)
-> (UserinfoResponse -> UserinfoResponse -> Bool)
-> Eq UserinfoResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserinfoResponse -> UserinfoResponse -> Bool
$c/= :: UserinfoResponse -> UserinfoResponse -> Bool
== :: UserinfoResponse -> UserinfoResponse -> Bool
$c== :: UserinfoResponse -> UserinfoResponse -> Bool
P.Eq, P.Typeable)
instance A.FromJSON UserinfoResponse where
parseJSON :: Value -> Parser UserinfoResponse
parseJSON = String
-> (Object -> Parser UserinfoResponse)
-> Value
-> Parser UserinfoResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"UserinfoResponse" ((Object -> Parser UserinfoResponse)
-> Value -> Parser UserinfoResponse)
-> (Object -> Parser UserinfoResponse)
-> Value
-> Parser UserinfoResponse
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse
UserinfoResponse
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"birthdate")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"email")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"email_verified")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"family_name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"gender")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"given_name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"locale")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"middle_name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"nickname")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phone_number")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"phone_number_verified")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"picture")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"preferred_username")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Integer -> Maybe Text -> Maybe Text -> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"profile")
Parser
(Maybe Text
-> Maybe Integer -> Maybe Text -> Maybe Text -> UserinfoResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer -> Maybe Text -> Maybe Text -> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"sub")
Parser
(Maybe Integer -> Maybe Text -> Maybe Text -> UserinfoResponse)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Maybe Text -> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"updated_at")
Parser (Maybe Text -> Maybe Text -> UserinfoResponse)
-> Parser (Maybe Text) -> Parser (Maybe Text -> UserinfoResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"website")
Parser (Maybe Text -> UserinfoResponse)
-> Parser (Maybe Text) -> Parser UserinfoResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"zoneinfo")
instance A.ToJSON UserinfoResponse where
toJSON :: UserinfoResponse -> Value
toJSON UserinfoResponse {Maybe Bool
Maybe Integer
Maybe Text
userinfoResponseZoneinfo :: Maybe Text
userinfoResponseWebsite :: Maybe Text
userinfoResponseUpdatedAt :: Maybe Integer
userinfoResponseSub :: Maybe Text
userinfoResponseProfile :: Maybe Text
userinfoResponsePreferredUsername :: Maybe Text
userinfoResponsePicture :: Maybe Text
userinfoResponsePhoneNumberVerified :: Maybe Bool
userinfoResponsePhoneNumber :: Maybe Text
userinfoResponseNickname :: Maybe Text
userinfoResponseName :: Maybe Text
userinfoResponseMiddleName :: Maybe Text
userinfoResponseLocale :: Maybe Text
userinfoResponseGivenName :: Maybe Text
userinfoResponseGender :: Maybe Text
userinfoResponseFamilyName :: Maybe Text
userinfoResponseEmailVerified :: Maybe Bool
userinfoResponseEmail :: Maybe Text
userinfoResponseBirthdate :: Maybe Text
userinfoResponseZoneinfo :: UserinfoResponse -> Maybe Text
userinfoResponseWebsite :: UserinfoResponse -> Maybe Text
userinfoResponseUpdatedAt :: UserinfoResponse -> Maybe Integer
userinfoResponseSub :: UserinfoResponse -> Maybe Text
userinfoResponseProfile :: UserinfoResponse -> Maybe Text
userinfoResponsePreferredUsername :: UserinfoResponse -> Maybe Text
userinfoResponsePicture :: UserinfoResponse -> Maybe Text
userinfoResponsePhoneNumberVerified :: UserinfoResponse -> Maybe Bool
userinfoResponsePhoneNumber :: UserinfoResponse -> Maybe Text
userinfoResponseNickname :: UserinfoResponse -> Maybe Text
userinfoResponseName :: UserinfoResponse -> Maybe Text
userinfoResponseMiddleName :: UserinfoResponse -> Maybe Text
userinfoResponseLocale :: UserinfoResponse -> Maybe Text
userinfoResponseGivenName :: UserinfoResponse -> Maybe Text
userinfoResponseGender :: UserinfoResponse -> Maybe Text
userinfoResponseFamilyName :: UserinfoResponse -> Maybe Text
userinfoResponseEmailVerified :: UserinfoResponse -> Maybe Bool
userinfoResponseEmail :: UserinfoResponse -> Maybe Text
userinfoResponseBirthdate :: UserinfoResponse -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"birthdate" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseBirthdate
, Key
"email" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseEmail
, Key
"email_verified" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
userinfoResponseEmailVerified
, Key
"family_name" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseFamilyName
, Key
"gender" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseGender
, Key
"given_name" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseGivenName
, Key
"locale" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseLocale
, Key
"middle_name" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseMiddleName
, Key
"name" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseName
, Key
"nickname" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseNickname
, Key
"phone_number" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponsePhoneNumber
, Key
"phone_number_verified" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
userinfoResponsePhoneNumberVerified
, Key
"picture" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponsePicture
, Key
"preferred_username" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponsePreferredUsername
, Key
"profile" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseProfile
, Key
"sub" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseSub
, Key
"updated_at" Key -> Maybe Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Integer
userinfoResponseUpdatedAt
, Key
"website" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseWebsite
, Key
"zoneinfo" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userinfoResponseZoneinfo
]
mkUserinfoResponse
:: UserinfoResponse
mkUserinfoResponse :: UserinfoResponse
mkUserinfoResponse =
UserinfoResponse :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> UserinfoResponse
UserinfoResponse
{ userinfoResponseBirthdate :: Maybe Text
userinfoResponseBirthdate = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseEmail :: Maybe Text
userinfoResponseEmail = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseEmailVerified :: Maybe Bool
userinfoResponseEmailVerified = Maybe Bool
forall a. Maybe a
Nothing
, userinfoResponseFamilyName :: Maybe Text
userinfoResponseFamilyName = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseGender :: Maybe Text
userinfoResponseGender = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseGivenName :: Maybe Text
userinfoResponseGivenName = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseLocale :: Maybe Text
userinfoResponseLocale = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseMiddleName :: Maybe Text
userinfoResponseMiddleName = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseName :: Maybe Text
userinfoResponseName = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseNickname :: Maybe Text
userinfoResponseNickname = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponsePhoneNumber :: Maybe Text
userinfoResponsePhoneNumber = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponsePhoneNumberVerified :: Maybe Bool
userinfoResponsePhoneNumberVerified = Maybe Bool
forall a. Maybe a
Nothing
, userinfoResponsePicture :: Maybe Text
userinfoResponsePicture = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponsePreferredUsername :: Maybe Text
userinfoResponsePreferredUsername = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseProfile :: Maybe Text
userinfoResponseProfile = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseSub :: Maybe Text
userinfoResponseSub = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseUpdatedAt :: Maybe Integer
userinfoResponseUpdatedAt = Maybe Integer
forall a. Maybe a
Nothing
, userinfoResponseWebsite :: Maybe Text
userinfoResponseWebsite = Maybe Text
forall a. Maybe a
Nothing
, userinfoResponseZoneinfo :: Maybe Text
userinfoResponseZoneinfo = Maybe Text
forall a. Maybe a
Nothing
}
data Version = Version
{ Version -> Maybe Text
versionVersion :: Maybe Text
} deriving (Int -> Version -> ShowS
[Version] -> ShowS
Version -> String
(Int -> Version -> ShowS)
-> (Version -> String) -> ([Version] -> ShowS) -> Show Version
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Version] -> ShowS
$cshowList :: [Version] -> ShowS
show :: Version -> String
$cshow :: Version -> String
showsPrec :: Int -> Version -> ShowS
$cshowsPrec :: Int -> Version -> ShowS
P.Show, Version -> Version -> Bool
(Version -> Version -> Bool)
-> (Version -> Version -> Bool) -> Eq Version
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Version -> Version -> Bool
$c/= :: Version -> Version -> Bool
== :: Version -> Version -> Bool
$c== :: Version -> Version -> Bool
P.Eq, P.Typeable)
instance A.FromJSON Version where
parseJSON :: Value -> Parser Version
parseJSON = String -> (Object -> Parser Version) -> Value -> Parser Version
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"Version" ((Object -> Parser Version) -> Value -> Parser Version)
-> (Object -> Parser Version) -> Value -> Parser Version
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text -> Version
Version
(Maybe Text -> Version) -> Parser (Maybe Text) -> Parser Version
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"version")
instance A.ToJSON Version where
toJSON :: Version -> Value
toJSON Version {Maybe Text
versionVersion :: Maybe Text
versionVersion :: Version -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"version" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
versionVersion
]
mkVersion
:: Version
mkVersion :: Version
mkVersion =
Version :: Maybe Text -> Version
Version
{ versionVersion :: Maybe Text
versionVersion = Maybe Text
forall a. Maybe a
Nothing
}
data Volume = Volume
{ Volume -> Maybe Text
volumeCreatedAt :: Maybe Text
, Volume -> Text
volumeDriver :: Text
, Volume -> Map String Text
volumeLabels :: (Map.Map String Text)
, Volume -> Text
volumeMountpoint :: Text
, Volume -> Text
volumeName :: Text
, Volume -> Map String Text
volumeOptions :: (Map.Map String Text)
, Volume -> Text
volumeScope :: Text
, Volume -> Maybe Value
volumeStatus :: Maybe A.Value
, Volume -> Maybe VolumeUsageData
volumeUsageData :: Maybe VolumeUsageData
} deriving (Int -> Volume -> ShowS
[Volume] -> ShowS
Volume -> String
(Int -> Volume -> ShowS)
-> (Volume -> String) -> ([Volume] -> ShowS) -> Show Volume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Volume] -> ShowS
$cshowList :: [Volume] -> ShowS
show :: Volume -> String
$cshow :: Volume -> String
showsPrec :: Int -> Volume -> ShowS
$cshowsPrec :: Int -> Volume -> ShowS
P.Show, Volume -> Volume -> Bool
(Volume -> Volume -> Bool)
-> (Volume -> Volume -> Bool) -> Eq Volume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Volume -> Volume -> Bool
$c/= :: Volume -> Volume -> Bool
== :: Volume -> Volume -> Bool
$c== :: Volume -> Volume -> Bool
P.Eq, P.Typeable)
instance A.FromJSON Volume where
parseJSON :: Value -> Parser Volume
parseJSON = String -> (Object -> Parser Volume) -> Value -> Parser Volume
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"Volume" ((Object -> Parser Volume) -> Value -> Parser Volume)
-> (Object -> Parser Volume) -> Value -> Parser Volume
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Maybe Text
-> Text
-> Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume
Volume
(Maybe Text
-> Text
-> Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
-> Parser (Maybe Text)
-> Parser
(Text
-> Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"CreatedAt")
Parser
(Text
-> Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
-> Parser Text
-> Parser
(Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Driver")
Parser
(Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
-> Parser (Map String Text)
-> Parser
(Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Map String Text)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Labels")
Parser
(Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
-> Parser Text
-> Parser
(Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Mountpoint")
Parser
(Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume)
-> Parser Text
-> Parser
(Map String Text
-> Text -> Maybe Value -> Maybe VolumeUsageData -> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Name")
Parser
(Map String Text
-> Text -> Maybe Value -> Maybe VolumeUsageData -> Volume)
-> Parser (Map String Text)
-> Parser (Text -> Maybe Value -> Maybe VolumeUsageData -> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Map String Text)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Options")
Parser (Text -> Maybe Value -> Maybe VolumeUsageData -> Volume)
-> Parser Text
-> Parser (Maybe Value -> Maybe VolumeUsageData -> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Scope")
Parser (Maybe Value -> Maybe VolumeUsageData -> Volume)
-> Parser (Maybe Value) -> Parser (Maybe VolumeUsageData -> Volume)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Value)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"Status")
Parser (Maybe VolumeUsageData -> Volume)
-> Parser (Maybe VolumeUsageData) -> Parser Volume
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe VolumeUsageData)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"UsageData")
instance A.ToJSON Volume where
toJSON :: Volume -> Value
toJSON Volume {Maybe Text
Maybe Value
Maybe VolumeUsageData
Text
Map String Text
volumeUsageData :: Maybe VolumeUsageData
volumeStatus :: Maybe Value
volumeScope :: Text
volumeOptions :: Map String Text
volumeName :: Text
volumeMountpoint :: Text
volumeLabels :: Map String Text
volumeDriver :: Text
volumeCreatedAt :: Maybe Text
volumeUsageData :: Volume -> Maybe VolumeUsageData
volumeStatus :: Volume -> Maybe Value
volumeScope :: Volume -> Text
volumeOptions :: Volume -> Map String Text
volumeName :: Volume -> Text
volumeMountpoint :: Volume -> Text
volumeLabels :: Volume -> Map String Text
volumeDriver :: Volume -> Text
volumeCreatedAt :: Volume -> Maybe Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"CreatedAt" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
volumeCreatedAt
, Key
"Driver" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
volumeDriver
, Key
"Labels" Key -> Map String Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Map String Text
volumeLabels
, Key
"Mountpoint" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
volumeMountpoint
, Key
"Name" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
volumeName
, Key
"Options" Key -> Map String Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Map String Text
volumeOptions
, Key
"Scope" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
volumeScope
, Key
"Status" Key -> Maybe Value -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Value
volumeStatus
, Key
"UsageData" Key -> Maybe VolumeUsageData -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe VolumeUsageData
volumeUsageData
]
mkVolume
:: Text
-> (Map.Map String Text)
-> Text
-> Text
-> (Map.Map String Text)
-> Text
-> Volume
mkVolume :: Text
-> Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Volume
mkVolume Text
volumeDriver Map String Text
volumeLabels Text
volumeMountpoint Text
volumeName Map String Text
volumeOptions Text
volumeScope =
Volume :: Maybe Text
-> Text
-> Map String Text
-> Text
-> Text
-> Map String Text
-> Text
-> Maybe Value
-> Maybe VolumeUsageData
-> Volume
Volume
{ volumeCreatedAt :: Maybe Text
volumeCreatedAt = Maybe Text
forall a. Maybe a
Nothing
, Text
volumeDriver :: Text
volumeDriver :: Text
volumeDriver
, Map String Text
volumeLabels :: Map String Text
volumeLabels :: Map String Text
volumeLabels
, Text
volumeMountpoint :: Text
volumeMountpoint :: Text
volumeMountpoint
, Text
volumeName :: Text
volumeName :: Text
volumeName
, Map String Text
volumeOptions :: Map String Text
volumeOptions :: Map String Text
volumeOptions
, Text
volumeScope :: Text
volumeScope :: Text
volumeScope
, volumeStatus :: Maybe Value
volumeStatus = Maybe Value
forall a. Maybe a
Nothing
, volumeUsageData :: Maybe VolumeUsageData
volumeUsageData = Maybe VolumeUsageData
forall a. Maybe a
Nothing
}
data VolumeUsageData = VolumeUsageData
{ VolumeUsageData -> Integer
volumeUsageDataRefCount :: Integer
, VolumeUsageData -> Integer
volumeUsageDataSize :: Integer
} deriving (Int -> VolumeUsageData -> ShowS
[VolumeUsageData] -> ShowS
VolumeUsageData -> String
(Int -> VolumeUsageData -> ShowS)
-> (VolumeUsageData -> String)
-> ([VolumeUsageData] -> ShowS)
-> Show VolumeUsageData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeUsageData] -> ShowS
$cshowList :: [VolumeUsageData] -> ShowS
show :: VolumeUsageData -> String
$cshow :: VolumeUsageData -> String
showsPrec :: Int -> VolumeUsageData -> ShowS
$cshowsPrec :: Int -> VolumeUsageData -> ShowS
P.Show, VolumeUsageData -> VolumeUsageData -> Bool
(VolumeUsageData -> VolumeUsageData -> Bool)
-> (VolumeUsageData -> VolumeUsageData -> Bool)
-> Eq VolumeUsageData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeUsageData -> VolumeUsageData -> Bool
$c/= :: VolumeUsageData -> VolumeUsageData -> Bool
== :: VolumeUsageData -> VolumeUsageData -> Bool
$c== :: VolumeUsageData -> VolumeUsageData -> Bool
P.Eq, P.Typeable)
instance A.FromJSON VolumeUsageData where
parseJSON :: Value -> Parser VolumeUsageData
parseJSON = String
-> (Object -> Parser VolumeUsageData)
-> Value
-> Parser VolumeUsageData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"VolumeUsageData" ((Object -> Parser VolumeUsageData)
-> Value -> Parser VolumeUsageData)
-> (Object -> Parser VolumeUsageData)
-> Value
-> Parser VolumeUsageData
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Integer -> Integer -> VolumeUsageData
VolumeUsageData
(Integer -> Integer -> VolumeUsageData)
-> Parser Integer -> Parser (Integer -> VolumeUsageData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"RefCount")
Parser (Integer -> VolumeUsageData)
-> Parser Integer -> Parser VolumeUsageData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Integer
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"Size")
instance A.ToJSON VolumeUsageData where
toJSON :: VolumeUsageData -> Value
toJSON VolumeUsageData {Integer
volumeUsageDataSize :: Integer
volumeUsageDataRefCount :: Integer
volumeUsageDataSize :: VolumeUsageData -> Integer
volumeUsageDataRefCount :: VolumeUsageData -> Integer
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"RefCount" Key -> Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Integer
volumeUsageDataRefCount
, Key
"Size" Key -> Integer -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Integer
volumeUsageDataSize
]
mkVolumeUsageData
:: Integer
-> Integer
-> VolumeUsageData
mkVolumeUsageData :: Integer -> Integer -> VolumeUsageData
mkVolumeUsageData Integer
volumeUsageDataRefCount Integer
volumeUsageDataSize =
VolumeUsageData :: Integer -> Integer -> VolumeUsageData
VolumeUsageData
{ Integer
volumeUsageDataRefCount :: Integer
volumeUsageDataRefCount :: Integer
volumeUsageDataRefCount
, Integer
volumeUsageDataSize :: Integer
volumeUsageDataSize :: Integer
volumeUsageDataSize
}
data WellKnown = WellKnown
{ WellKnown -> Text
wellKnownAuthorizationEndpoint :: Text
, WellKnown -> Maybe Bool
wellKnownBackchannelLogoutSessionSupported :: Maybe Bool
, WellKnown -> Maybe Bool
wellKnownBackchannelLogoutSupported :: Maybe Bool
, WellKnown -> Maybe Bool
wellKnownClaimsParameterSupported :: Maybe Bool
, WellKnown -> Maybe [Text]
wellKnownClaimsSupported :: Maybe [Text]
, WellKnown -> Maybe Text
wellKnownEndSessionEndpoint :: Maybe Text
, WellKnown -> Maybe Bool
wellKnownFrontchannelLogoutSessionSupported :: Maybe Bool
, WellKnown -> Maybe Bool
wellKnownFrontchannelLogoutSupported :: Maybe Bool
, WellKnown -> Maybe [Text]
wellKnownGrantTypesSupported :: Maybe [Text]
, WellKnown -> [Text]
wellKnownIdTokenSigningAlgValuesSupported :: [Text]
, WellKnown -> Text
wellKnownIssuer :: Text
, WellKnown -> Text
wellKnownJwksUri :: Text
, WellKnown -> Maybe Text
wellKnownRegistrationEndpoint :: Maybe Text
, WellKnown -> Maybe [Text]
wellKnownRequestObjectSigningAlgValuesSupported :: Maybe [Text]
, WellKnown -> Maybe Bool
wellKnownRequestParameterSupported :: Maybe Bool
, WellKnown -> Maybe Bool
wellKnownRequestUriParameterSupported :: Maybe Bool
, WellKnown -> Maybe Bool
wellKnownRequireRequestUriRegistration :: Maybe Bool
, WellKnown -> Maybe [Text]
wellKnownResponseModesSupported :: Maybe [Text]
, WellKnown -> [Text]
wellKnownResponseTypesSupported :: [Text]
, WellKnown -> Maybe Text
wellKnownRevocationEndpoint :: Maybe Text
, WellKnown -> Maybe [Text]
wellKnownScopesSupported :: Maybe [Text]
, WellKnown -> [Text]
wellKnownSubjectTypesSupported :: [Text]
, WellKnown -> Text
wellKnownTokenEndpoint :: Text
, WellKnown -> Maybe [Text]
wellKnownTokenEndpointAuthMethodsSupported :: Maybe [Text]
, WellKnown -> Maybe Text
wellKnownUserinfoEndpoint :: Maybe Text
, WellKnown -> Maybe [Text]
wellKnownUserinfoSigningAlgValuesSupported :: Maybe [Text]
} deriving (Int -> WellKnown -> ShowS
[WellKnown] -> ShowS
WellKnown -> String
(Int -> WellKnown -> ShowS)
-> (WellKnown -> String)
-> ([WellKnown] -> ShowS)
-> Show WellKnown
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WellKnown] -> ShowS
$cshowList :: [WellKnown] -> ShowS
show :: WellKnown -> String
$cshow :: WellKnown -> String
showsPrec :: Int -> WellKnown -> ShowS
$cshowsPrec :: Int -> WellKnown -> ShowS
P.Show, WellKnown -> WellKnown -> Bool
(WellKnown -> WellKnown -> Bool)
-> (WellKnown -> WellKnown -> Bool) -> Eq WellKnown
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WellKnown -> WellKnown -> Bool
$c/= :: WellKnown -> WellKnown -> Bool
== :: WellKnown -> WellKnown -> Bool
$c== :: WellKnown -> WellKnown -> Bool
P.Eq, P.Typeable)
instance A.FromJSON WellKnown where
parseJSON :: Value -> Parser WellKnown
parseJSON = String -> (Object -> Parser WellKnown) -> Value -> Parser WellKnown
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"WellKnown" ((Object -> Parser WellKnown) -> Value -> Parser WellKnown)
-> (Object -> Parser WellKnown) -> Value -> Parser WellKnown
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown
WellKnown
(Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser Text
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"authorization_endpoint")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"backchannel_logout_session_supported")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"backchannel_logout_supported")
Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"claims_parameter_supported")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"claims_supported")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"end_session_endpoint")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"frontchannel_logout_session_supported")
Parser
(Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"frontchannel_logout_supported")
Parser
(Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe [Text])
-> Parser
([Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"grant_types_supported")
Parser
([Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser [Text]
-> Parser
(Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id_token_signing_alg_values_supported")
Parser
(Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser Text
-> Parser
(Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"issuer")
Parser
(Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser Text
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"jwks_uri")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"registration_endpoint")
Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe [Text])
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_object_signing_alg_values_supported")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_parameter_supported")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"request_uri_parameter_supported")
Parser
(Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"require_request_uri_registration")
Parser
(Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe [Text])
-> Parser
([Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"response_modes_supported")
Parser
([Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser [Text]
-> Parser
(Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"response_types_supported")
Parser
(Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"revocation_endpoint")
Parser
(Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown)
-> Parser (Maybe [Text])
-> Parser
([Text]
-> Text -> Maybe [Text] -> Maybe Text -> Maybe [Text] -> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"scopes_supported")
Parser
([Text]
-> Text -> Maybe [Text] -> Maybe Text -> Maybe [Text] -> WellKnown)
-> Parser [Text]
-> Parser
(Text -> Maybe [Text] -> Maybe Text -> Maybe [Text] -> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser [Text]
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"subject_types_supported")
Parser
(Text -> Maybe [Text] -> Maybe Text -> Maybe [Text] -> WellKnown)
-> Parser Text
-> Parser (Maybe [Text] -> Maybe Text -> Maybe [Text] -> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"token_endpoint")
Parser (Maybe [Text] -> Maybe Text -> Maybe [Text] -> WellKnown)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Maybe [Text] -> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"token_endpoint_auth_methods_supported")
Parser (Maybe Text -> Maybe [Text] -> WellKnown)
-> Parser (Maybe Text) -> Parser (Maybe [Text] -> WellKnown)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"userinfo_endpoint")
Parser (Maybe [Text] -> WellKnown)
-> Parser (Maybe [Text]) -> Parser WellKnown
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Object
o Object -> Key -> Parser (Maybe [Text])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"userinfo_signing_alg_values_supported")
instance A.ToJSON WellKnown where
toJSON :: WellKnown -> Value
toJSON WellKnown {[Text]
Maybe Bool
Maybe [Text]
Maybe Text
Text
wellKnownUserinfoSigningAlgValuesSupported :: Maybe [Text]
wellKnownUserinfoEndpoint :: Maybe Text
wellKnownTokenEndpointAuthMethodsSupported :: Maybe [Text]
wellKnownTokenEndpoint :: Text
wellKnownSubjectTypesSupported :: [Text]
wellKnownScopesSupported :: Maybe [Text]
wellKnownRevocationEndpoint :: Maybe Text
wellKnownResponseTypesSupported :: [Text]
wellKnownResponseModesSupported :: Maybe [Text]
wellKnownRequireRequestUriRegistration :: Maybe Bool
wellKnownRequestUriParameterSupported :: Maybe Bool
wellKnownRequestParameterSupported :: Maybe Bool
wellKnownRequestObjectSigningAlgValuesSupported :: Maybe [Text]
wellKnownRegistrationEndpoint :: Maybe Text
wellKnownJwksUri :: Text
wellKnownIssuer :: Text
wellKnownIdTokenSigningAlgValuesSupported :: [Text]
wellKnownGrantTypesSupported :: Maybe [Text]
wellKnownFrontchannelLogoutSupported :: Maybe Bool
wellKnownFrontchannelLogoutSessionSupported :: Maybe Bool
wellKnownEndSessionEndpoint :: Maybe Text
wellKnownClaimsSupported :: Maybe [Text]
wellKnownClaimsParameterSupported :: Maybe Bool
wellKnownBackchannelLogoutSupported :: Maybe Bool
wellKnownBackchannelLogoutSessionSupported :: Maybe Bool
wellKnownAuthorizationEndpoint :: Text
wellKnownUserinfoSigningAlgValuesSupported :: WellKnown -> Maybe [Text]
wellKnownUserinfoEndpoint :: WellKnown -> Maybe Text
wellKnownTokenEndpointAuthMethodsSupported :: WellKnown -> Maybe [Text]
wellKnownTokenEndpoint :: WellKnown -> Text
wellKnownSubjectTypesSupported :: WellKnown -> [Text]
wellKnownScopesSupported :: WellKnown -> Maybe [Text]
wellKnownRevocationEndpoint :: WellKnown -> Maybe Text
wellKnownResponseTypesSupported :: WellKnown -> [Text]
wellKnownResponseModesSupported :: WellKnown -> Maybe [Text]
wellKnownRequireRequestUriRegistration :: WellKnown -> Maybe Bool
wellKnownRequestUriParameterSupported :: WellKnown -> Maybe Bool
wellKnownRequestParameterSupported :: WellKnown -> Maybe Bool
wellKnownRequestObjectSigningAlgValuesSupported :: WellKnown -> Maybe [Text]
wellKnownRegistrationEndpoint :: WellKnown -> Maybe Text
wellKnownJwksUri :: WellKnown -> Text
wellKnownIssuer :: WellKnown -> Text
wellKnownIdTokenSigningAlgValuesSupported :: WellKnown -> [Text]
wellKnownGrantTypesSupported :: WellKnown -> Maybe [Text]
wellKnownFrontchannelLogoutSupported :: WellKnown -> Maybe Bool
wellKnownFrontchannelLogoutSessionSupported :: WellKnown -> Maybe Bool
wellKnownEndSessionEndpoint :: WellKnown -> Maybe Text
wellKnownClaimsSupported :: WellKnown -> Maybe [Text]
wellKnownClaimsParameterSupported :: WellKnown -> Maybe Bool
wellKnownBackchannelLogoutSupported :: WellKnown -> Maybe Bool
wellKnownBackchannelLogoutSessionSupported :: WellKnown -> Maybe Bool
wellKnownAuthorizationEndpoint :: WellKnown -> Text
..} =
[(Key, Value)] -> Value
_omitNulls
[ Key
"authorization_endpoint" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
wellKnownAuthorizationEndpoint
, Key
"backchannel_logout_session_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownBackchannelLogoutSessionSupported
, Key
"backchannel_logout_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownBackchannelLogoutSupported
, Key
"claims_parameter_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownClaimsParameterSupported
, Key
"claims_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownClaimsSupported
, Key
"end_session_endpoint" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
wellKnownEndSessionEndpoint
, Key
"frontchannel_logout_session_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownFrontchannelLogoutSessionSupported
, Key
"frontchannel_logout_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownFrontchannelLogoutSupported
, Key
"grant_types_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownGrantTypesSupported
, Key
"id_token_signing_alg_values_supported" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
wellKnownIdTokenSigningAlgValuesSupported
, Key
"issuer" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
wellKnownIssuer
, Key
"jwks_uri" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
wellKnownJwksUri
, Key
"registration_endpoint" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
wellKnownRegistrationEndpoint
, Key
"request_object_signing_alg_values_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownRequestObjectSigningAlgValuesSupported
, Key
"request_parameter_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownRequestParameterSupported
, Key
"request_uri_parameter_supported" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownRequestUriParameterSupported
, Key
"require_request_uri_registration" Key -> Maybe Bool -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
wellKnownRequireRequestUriRegistration
, Key
"response_modes_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownResponseModesSupported
, Key
"response_types_supported" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
wellKnownResponseTypesSupported
, Key
"revocation_endpoint" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
wellKnownRevocationEndpoint
, Key
"scopes_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownScopesSupported
, Key
"subject_types_supported" Key -> [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [Text]
wellKnownSubjectTypesSupported
, Key
"token_endpoint" Key -> Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text
wellKnownTokenEndpoint
, Key
"token_endpoint_auth_methods_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownTokenEndpointAuthMethodsSupported
, Key
"userinfo_endpoint" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
wellKnownUserinfoEndpoint
, Key
"userinfo_signing_alg_values_supported" Key -> Maybe [Text] -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe [Text]
wellKnownUserinfoSigningAlgValuesSupported
]
mkWellKnown
:: Text
-> [Text]
-> Text
-> Text
-> [Text]
-> [Text]
-> Text
-> WellKnown
mkWellKnown :: Text
-> [Text] -> Text -> Text -> [Text] -> [Text] -> Text -> WellKnown
mkWellKnown Text
wellKnownAuthorizationEndpoint [Text]
wellKnownIdTokenSigningAlgValuesSupported Text
wellKnownIssuer Text
wellKnownJwksUri [Text]
wellKnownResponseTypesSupported [Text]
wellKnownSubjectTypesSupported Text
wellKnownTokenEndpoint =
WellKnown :: Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Text
-> Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> [Text]
-> Maybe Text
-> Maybe [Text]
-> [Text]
-> Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> WellKnown
WellKnown
{ Text
wellKnownAuthorizationEndpoint :: Text
wellKnownAuthorizationEndpoint :: Text
wellKnownAuthorizationEndpoint
, wellKnownBackchannelLogoutSessionSupported :: Maybe Bool
wellKnownBackchannelLogoutSessionSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownBackchannelLogoutSupported :: Maybe Bool
wellKnownBackchannelLogoutSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownClaimsParameterSupported :: Maybe Bool
wellKnownClaimsParameterSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownClaimsSupported :: Maybe [Text]
wellKnownClaimsSupported = Maybe [Text]
forall a. Maybe a
Nothing
, wellKnownEndSessionEndpoint :: Maybe Text
wellKnownEndSessionEndpoint = Maybe Text
forall a. Maybe a
Nothing
, wellKnownFrontchannelLogoutSessionSupported :: Maybe Bool
wellKnownFrontchannelLogoutSessionSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownFrontchannelLogoutSupported :: Maybe Bool
wellKnownFrontchannelLogoutSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownGrantTypesSupported :: Maybe [Text]
wellKnownGrantTypesSupported = Maybe [Text]
forall a. Maybe a
Nothing
, [Text]
wellKnownIdTokenSigningAlgValuesSupported :: [Text]
wellKnownIdTokenSigningAlgValuesSupported :: [Text]
wellKnownIdTokenSigningAlgValuesSupported
, Text
wellKnownIssuer :: Text
wellKnownIssuer :: Text
wellKnownIssuer
, Text
wellKnownJwksUri :: Text
wellKnownJwksUri :: Text
wellKnownJwksUri
, wellKnownRegistrationEndpoint :: Maybe Text
wellKnownRegistrationEndpoint = Maybe Text
forall a. Maybe a
Nothing
, wellKnownRequestObjectSigningAlgValuesSupported :: Maybe [Text]
wellKnownRequestObjectSigningAlgValuesSupported = Maybe [Text]
forall a. Maybe a
Nothing
, wellKnownRequestParameterSupported :: Maybe Bool
wellKnownRequestParameterSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownRequestUriParameterSupported :: Maybe Bool
wellKnownRequestUriParameterSupported = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownRequireRequestUriRegistration :: Maybe Bool
wellKnownRequireRequestUriRegistration = Maybe Bool
forall a. Maybe a
Nothing
, wellKnownResponseModesSupported :: Maybe [Text]
wellKnownResponseModesSupported = Maybe [Text]
forall a. Maybe a
Nothing
, [Text]
wellKnownResponseTypesSupported :: [Text]
wellKnownResponseTypesSupported :: [Text]
wellKnownResponseTypesSupported
, wellKnownRevocationEndpoint :: Maybe Text
wellKnownRevocationEndpoint = Maybe Text
forall a. Maybe a
Nothing
, wellKnownScopesSupported :: Maybe [Text]
wellKnownScopesSupported = Maybe [Text]
forall a. Maybe a
Nothing
, [Text]
wellKnownSubjectTypesSupported :: [Text]
wellKnownSubjectTypesSupported :: [Text]
wellKnownSubjectTypesSupported
, Text
wellKnownTokenEndpoint :: Text
wellKnownTokenEndpoint :: Text
wellKnownTokenEndpoint
, wellKnownTokenEndpointAuthMethodsSupported :: Maybe [Text]
wellKnownTokenEndpointAuthMethodsSupported = Maybe [Text]
forall a. Maybe a
Nothing
, wellKnownUserinfoEndpoint :: Maybe Text
wellKnownUserinfoEndpoint = Maybe Text
forall a. Maybe a
Nothing
, wellKnownUserinfoSigningAlgValuesSupported :: Maybe [Text]
wellKnownUserinfoSigningAlgValuesSupported = Maybe [Text]
forall a. Maybe a
Nothing
}
data AuthBasicBasic =
AuthBasicBasic B.ByteString B.ByteString
deriving (AuthBasicBasic -> AuthBasicBasic -> Bool
(AuthBasicBasic -> AuthBasicBasic -> Bool)
-> (AuthBasicBasic -> AuthBasicBasic -> Bool) -> Eq AuthBasicBasic
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthBasicBasic -> AuthBasicBasic -> Bool
$c/= :: AuthBasicBasic -> AuthBasicBasic -> Bool
== :: AuthBasicBasic -> AuthBasicBasic -> Bool
$c== :: AuthBasicBasic -> AuthBasicBasic -> Bool
P.Eq, Int -> AuthBasicBasic -> ShowS
[AuthBasicBasic] -> ShowS
AuthBasicBasic -> String
(Int -> AuthBasicBasic -> ShowS)
-> (AuthBasicBasic -> String)
-> ([AuthBasicBasic] -> ShowS)
-> Show AuthBasicBasic
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthBasicBasic] -> ShowS
$cshowList :: [AuthBasicBasic] -> ShowS
show :: AuthBasicBasic -> String
$cshow :: AuthBasicBasic -> String
showsPrec :: Int -> AuthBasicBasic -> ShowS
$cshowsPrec :: Int -> AuthBasicBasic -> ShowS
P.Show, P.Typeable)
instance AuthMethod AuthBasicBasic where
applyAuthMethod :: ORYHydraConfig
-> AuthBasicBasic
-> ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept)
applyAuthMethod ORYHydraConfig
_ a :: AuthBasicBasic
a@(AuthBasicBasic ByteString
user ByteString
pw) ORYHydraRequest req contentType res accept
req =
ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept)
forall (f :: * -> *) a. Applicative f => a -> f a
P.pure (ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept))
-> ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept)
forall a b. (a -> b) -> a -> b
$
if (AuthBasicBasic -> TypeRep
forall a. Typeable a => a -> TypeRep
P.typeOf AuthBasicBasic
a TypeRep -> [TypeRep] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`P.elem` ORYHydraRequest req contentType res accept -> [TypeRep]
forall req contentType res accept.
ORYHydraRequest req contentType res accept -> [TypeRep]
rAuthTypes ORYHydraRequest req contentType res accept
req)
then ORYHydraRequest req contentType res accept
req ORYHydraRequest req contentType res accept
-> [Header] -> ORYHydraRequest req contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [Header] -> ORYHydraRequest req contentType res accept
`setHeader` (HeaderName, Text) -> [Header]
forall a. ToHttpApiData a => (HeaderName, a) -> [Header]
toHeader (HeaderName
"Authorization", ByteString -> Text
T.decodeUtf8 ByteString
cred)
ORYHydraRequest req contentType res accept
-> (ORYHydraRequest req contentType res accept
-> ORYHydraRequest req contentType res accept)
-> ORYHydraRequest req contentType res accept
forall a b. a -> (a -> b) -> b
& ASetter
(ORYHydraRequest req contentType res accept)
(ORYHydraRequest req contentType res accept)
[TypeRep]
[TypeRep]
-> ([TypeRep] -> [TypeRep])
-> ORYHydraRequest req contentType res accept
-> ORYHydraRequest req contentType res accept
forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
L.over ASetter
(ORYHydraRequest req contentType res accept)
(ORYHydraRequest req contentType res accept)
[TypeRep]
[TypeRep]
forall req contentType res accept.
Lens_' (ORYHydraRequest req contentType res accept) [TypeRep]
rAuthTypesL ((TypeRep -> Bool) -> [TypeRep] -> [TypeRep]
forall a. (a -> Bool) -> [a] -> [a]
P.filter (TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
/= AuthBasicBasic -> TypeRep
forall a. Typeable a => a -> TypeRep
P.typeOf AuthBasicBasic
a))
else ORYHydraRequest req contentType res accept
req
where cred :: ByteString
cred = ByteString -> ByteString -> ByteString
BC.append ByteString
"Basic " (ByteString -> ByteString
B64.encode (ByteString -> ByteString) -> ByteString -> ByteString
forall a b. (a -> b) -> a -> b
$ [ByteString] -> ByteString
BC.concat [ ByteString
user, ByteString
":", ByteString
pw ])
data AuthOAuthOauth2 =
AuthOAuthOauth2 Text
deriving (AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool
(AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool)
-> (AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool)
-> Eq AuthOAuthOauth2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool
$c/= :: AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool
== :: AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool
$c== :: AuthOAuthOauth2 -> AuthOAuthOauth2 -> Bool
P.Eq, Int -> AuthOAuthOauth2 -> ShowS
[AuthOAuthOauth2] -> ShowS
AuthOAuthOauth2 -> String
(Int -> AuthOAuthOauth2 -> ShowS)
-> (AuthOAuthOauth2 -> String)
-> ([AuthOAuthOauth2] -> ShowS)
-> Show AuthOAuthOauth2
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthOAuthOauth2] -> ShowS
$cshowList :: [AuthOAuthOauth2] -> ShowS
show :: AuthOAuthOauth2 -> String
$cshow :: AuthOAuthOauth2 -> String
showsPrec :: Int -> AuthOAuthOauth2 -> ShowS
$cshowsPrec :: Int -> AuthOAuthOauth2 -> ShowS
P.Show, P.Typeable)
instance AuthMethod AuthOAuthOauth2 where
applyAuthMethod :: ORYHydraConfig
-> AuthOAuthOauth2
-> ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept)
applyAuthMethod ORYHydraConfig
_ a :: AuthOAuthOauth2
a@(AuthOAuthOauth2 Text
secret) ORYHydraRequest req contentType res accept
req =
ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept)
forall (f :: * -> *) a. Applicative f => a -> f a
P.pure (ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept))
-> ORYHydraRequest req contentType res accept
-> IO (ORYHydraRequest req contentType res accept)
forall a b. (a -> b) -> a -> b
$
if (AuthOAuthOauth2 -> TypeRep
forall a. Typeable a => a -> TypeRep
P.typeOf AuthOAuthOauth2
a TypeRep -> [TypeRep] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`P.elem` ORYHydraRequest req contentType res accept -> [TypeRep]
forall req contentType res accept.
ORYHydraRequest req contentType res accept -> [TypeRep]
rAuthTypes ORYHydraRequest req contentType res accept
req)
then ORYHydraRequest req contentType res accept
req ORYHydraRequest req contentType res accept
-> [Header] -> ORYHydraRequest req contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [Header] -> ORYHydraRequest req contentType res accept
`setHeader` (HeaderName, Text) -> [Header]
forall a. ToHttpApiData a => (HeaderName, a) -> [Header]
toHeader (HeaderName
"Authorization", Text
"Bearer " Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
secret)
ORYHydraRequest req contentType res accept
-> (ORYHydraRequest req contentType res accept
-> ORYHydraRequest req contentType res accept)
-> ORYHydraRequest req contentType res accept
forall a b. a -> (a -> b) -> b
& ASetter
(ORYHydraRequest req contentType res accept)
(ORYHydraRequest req contentType res accept)
[TypeRep]
[TypeRep]
-> ([TypeRep] -> [TypeRep])
-> ORYHydraRequest req contentType res accept
-> ORYHydraRequest req contentType res accept
forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
L.over ASetter
(ORYHydraRequest req contentType res accept)
(ORYHydraRequest req contentType res accept)
[TypeRep]
[TypeRep]
forall req contentType res accept.
Lens_' (ORYHydraRequest req contentType res accept) [TypeRep]
rAuthTypesL ((TypeRep -> Bool) -> [TypeRep] -> [TypeRep]
forall a. (a -> Bool) -> [a] -> [a]
P.filter (TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
/= AuthOAuthOauth2 -> TypeRep
forall a. Typeable a => a -> TypeRep
P.typeOf AuthOAuthOauth2
a))
else ORYHydraRequest req contentType res accept
req