{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoFieldSelectors #-}

module WikiMusic.Interaction.Model.Auth
  ( GetMeQueryResponse (..),
  )
where

import Data.Aeson
import Data.OpenApi
import Data.UUID
import Optics
import Relude
import WikiMusic.Model.Auth

data GetMeQueryResponse = GetMeQueryResponse
  { GetMeQueryResponse -> UUID
identifier :: UUID,
    GetMeQueryResponse -> Text
displayName :: Text,
    GetMeQueryResponse -> Text
emailAddress :: Text,
    GetMeQueryResponse -> [UserRole]
roles :: [UserRole]
  }
  deriving (GetMeQueryResponse -> GetMeQueryResponse -> Bool
(GetMeQueryResponse -> GetMeQueryResponse -> Bool)
-> (GetMeQueryResponse -> GetMeQueryResponse -> Bool)
-> Eq GetMeQueryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetMeQueryResponse -> GetMeQueryResponse -> Bool
== :: GetMeQueryResponse -> GetMeQueryResponse -> Bool
$c/= :: GetMeQueryResponse -> GetMeQueryResponse -> Bool
/= :: GetMeQueryResponse -> GetMeQueryResponse -> Bool
Eq, Int -> GetMeQueryResponse -> ShowS
[GetMeQueryResponse] -> ShowS
GetMeQueryResponse -> String
(Int -> GetMeQueryResponse -> ShowS)
-> (GetMeQueryResponse -> String)
-> ([GetMeQueryResponse] -> ShowS)
-> Show GetMeQueryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetMeQueryResponse -> ShowS
showsPrec :: Int -> GetMeQueryResponse -> ShowS
$cshow :: GetMeQueryResponse -> String
show :: GetMeQueryResponse -> String
$cshowList :: [GetMeQueryResponse] -> ShowS
showList :: [GetMeQueryResponse] -> ShowS
Show, (forall x. GetMeQueryResponse -> Rep GetMeQueryResponse x)
-> (forall x. Rep GetMeQueryResponse x -> GetMeQueryResponse)
-> Generic GetMeQueryResponse
forall x. Rep GetMeQueryResponse x -> GetMeQueryResponse
forall x. GetMeQueryResponse -> Rep GetMeQueryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. GetMeQueryResponse -> Rep GetMeQueryResponse x
from :: forall x. GetMeQueryResponse -> Rep GetMeQueryResponse x
$cto :: forall x. Rep GetMeQueryResponse x -> GetMeQueryResponse
to :: forall x. Rep GetMeQueryResponse x -> GetMeQueryResponse
Generic, Maybe GetMeQueryResponse
Value -> Parser [GetMeQueryResponse]
Value -> Parser GetMeQueryResponse
(Value -> Parser GetMeQueryResponse)
-> (Value -> Parser [GetMeQueryResponse])
-> Maybe GetMeQueryResponse
-> FromJSON GetMeQueryResponse
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser GetMeQueryResponse
parseJSON :: Value -> Parser GetMeQueryResponse
$cparseJSONList :: Value -> Parser [GetMeQueryResponse]
parseJSONList :: Value -> Parser [GetMeQueryResponse]
$comittedField :: Maybe GetMeQueryResponse
omittedField :: Maybe GetMeQueryResponse
FromJSON, [GetMeQueryResponse] -> Value
[GetMeQueryResponse] -> Encoding
GetMeQueryResponse -> Bool
GetMeQueryResponse -> Value
GetMeQueryResponse -> Encoding
(GetMeQueryResponse -> Value)
-> (GetMeQueryResponse -> Encoding)
-> ([GetMeQueryResponse] -> Value)
-> ([GetMeQueryResponse] -> Encoding)
-> (GetMeQueryResponse -> Bool)
-> ToJSON GetMeQueryResponse
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: GetMeQueryResponse -> Value
toJSON :: GetMeQueryResponse -> Value
$ctoEncoding :: GetMeQueryResponse -> Encoding
toEncoding :: GetMeQueryResponse -> Encoding
$ctoJSONList :: [GetMeQueryResponse] -> Value
toJSONList :: [GetMeQueryResponse] -> Value
$ctoEncodingList :: [GetMeQueryResponse] -> Encoding
toEncodingList :: [GetMeQueryResponse] -> Encoding
$comitField :: GetMeQueryResponse -> Bool
omitField :: GetMeQueryResponse -> Bool
ToJSON, Typeable GetMeQueryResponse
Typeable GetMeQueryResponse =>
(Proxy GetMeQueryResponse
 -> Declare (Definitions Schema) NamedSchema)
-> ToSchema GetMeQueryResponse
Proxy GetMeQueryResponse
-> Declare (Definitions Schema) NamedSchema
forall a.
Typeable a =>
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
$cdeclareNamedSchema :: Proxy GetMeQueryResponse
-> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy GetMeQueryResponse
-> Declare (Definitions Schema) NamedSchema
ToSchema)

makeFieldLabelsNoPrefix ''GetMeQueryResponse