module Strive.Options.Athletes
( UpdateCurrentAthleteOptions(..)
, GetAthleteCrsOptions
) where
import Data.Default (Default, def)
import Network.HTTP.Types (QueryLike, toQuery)
import Strive.Enums (Gender)
import Strive.Internal.Options (PaginationOptions)
data UpdateCurrentAthleteOptions = UpdateCurrentAthleteOptions
{ UpdateCurrentAthleteOptions -> Maybe String
updateCurrentAthleteOptions_city :: Maybe String
, UpdateCurrentAthleteOptions -> Maybe String
updateCurrentAthleteOptions_state :: Maybe String
, UpdateCurrentAthleteOptions -> Maybe String
updateCurrentAthleteOptions_country :: Maybe String
, UpdateCurrentAthleteOptions -> Maybe Gender
updateCurrentAthleteOptions_sex :: Maybe Gender
, UpdateCurrentAthleteOptions -> Maybe Double
updateCurrentAthleteOptions_weight :: Maybe Double
}
deriving Int -> UpdateCurrentAthleteOptions -> ShowS
[UpdateCurrentAthleteOptions] -> ShowS
UpdateCurrentAthleteOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCurrentAthleteOptions] -> ShowS
$cshowList :: [UpdateCurrentAthleteOptions] -> ShowS
show :: UpdateCurrentAthleteOptions -> String
$cshow :: UpdateCurrentAthleteOptions -> String
showsPrec :: Int -> UpdateCurrentAthleteOptions -> ShowS
$cshowsPrec :: Int -> UpdateCurrentAthleteOptions -> ShowS
Show
instance Default UpdateCurrentAthleteOptions where
def :: UpdateCurrentAthleteOptions
def = UpdateCurrentAthleteOptions
{ updateCurrentAthleteOptions_city :: Maybe String
updateCurrentAthleteOptions_city = forall a. Maybe a
Nothing
, updateCurrentAthleteOptions_state :: Maybe String
updateCurrentAthleteOptions_state = forall a. Maybe a
Nothing
, updateCurrentAthleteOptions_country :: Maybe String
updateCurrentAthleteOptions_country = forall a. Maybe a
Nothing
, updateCurrentAthleteOptions_sex :: Maybe Gender
updateCurrentAthleteOptions_sex = forall a. Maybe a
Nothing
, updateCurrentAthleteOptions_weight :: Maybe Double
updateCurrentAthleteOptions_weight = forall a. Maybe a
Nothing
}
instance QueryLike UpdateCurrentAthleteOptions where
toQuery :: UpdateCurrentAthleteOptions -> Query
toQuery UpdateCurrentAthleteOptions
options = forall a. QueryLike a => a -> Query
toQuery
[ (String
"city", UpdateCurrentAthleteOptions -> Maybe String
updateCurrentAthleteOptions_city UpdateCurrentAthleteOptions
options)
, (String
"state", UpdateCurrentAthleteOptions -> Maybe String
updateCurrentAthleteOptions_state UpdateCurrentAthleteOptions
options)
, (String
"country", UpdateCurrentAthleteOptions -> Maybe String
updateCurrentAthleteOptions_country UpdateCurrentAthleteOptions
options)
, (String
"sex", forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Show a => a -> String
show (UpdateCurrentAthleteOptions -> Maybe Gender
updateCurrentAthleteOptions_sex UpdateCurrentAthleteOptions
options))
, (String
"weight", forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Show a => a -> String
show (UpdateCurrentAthleteOptions -> Maybe Double
updateCurrentAthleteOptions_weight UpdateCurrentAthleteOptions
options))
]
type GetAthleteCrsOptions = PaginationOptions