    {-
       OpenAPI Petstore

       This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\

       OpenAPI Version: 3.0.1
       OpenAPI Petstore API version: 1.0.0
       Generated by OpenAPI Generator (https://openapi-generator.tech)
    -}

    {-|
    Module : OpenAPIPetstore.API.Store
    -}

    {-# LANGUAGE FlexibleContexts #-}
    {-# LANGUAGE FlexibleInstances #-}
    {-# LANGUAGE MonoLocalBinds #-}
    {-# LANGUAGE MultiParamTypeClasses #-}
    {-# LANGUAGE OverloadedStrings #-}
    {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}

    module OpenAPIPetstore.API.Store where

    import OpenAPIPetstore.Core
    import OpenAPIPetstore.MimeTypes
    import OpenAPIPetstore.Model as M

    import qualified Data.Aeson as A
    import qualified Data.ByteString as B
    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.Map as Map
    import qualified Data.Maybe as P
    import qualified Data.Proxy as P (Proxy(..))
    import qualified Data.Set as Set
    import qualified Data.String as P
    import qualified Data.Text as T
    import qualified Data.Text.Encoding as T
    import qualified Data.Text.Lazy as TL
    import qualified Data.Text.Lazy.Encoding as TL
    import qualified Data.Time as TI
    import qualified Network.HTTP.Client.MultipartFormData as NH
    import qualified Network.HTTP.Media as ME
    import qualified Network.HTTP.Types as NH
    import qualified Web.FormUrlEncoded as WH
    import qualified Web.HttpApiData as WH

    import Data.Text (Text)
    import GHC.Base ((<|>))

    import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
    import qualified Prelude as P

    -- * Operations

    -- ** Store

    -- *** deleteOrder

    -- | @DELETE \/store\/order\/{order_id}@
    --
    -- Delete purchase order by ID
    --
    -- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
    --
    deleteOrder
      :: OrderIdText -- ^ "orderId" -  ID of the order that needs to be deleted
      -> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent
    deleteOrder :: OrderIdText
    -> OpenAPIPetstoreRequest
         DeleteOrder MimeNoContent NoContent MimeNoContent
    deleteOrder (OrderIdText Text
    orderId) =
      Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest
         DeleteOrder MimeNoContent NoContent MimeNoContent
    forall req contentType res accept.
    Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest req contentType res accept
    _mkRequest Method
    "DELETE" [ByteString
    "/store/order/",Text -> ByteString
    forall a. ToHttpApiData a => a -> ByteString
    toPath Text
    orderId]

    data DeleteOrder
    instance Produces DeleteOrder MimeNoContent

    -- *** getInventory

    -- | @GET \/store\/inventory@
    --
    -- Returns pet inventories by status
    --
    -- Returns a map of status codes to quantities
    --
    -- AuthMethod: 'AuthApiKeyApiKey'
    --
    getInventory
      :: OpenAPIPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int)) MimeJSON
    getInventory :: OpenAPIPetstoreRequest
      GetInventory MimeNoContent (Map String Int) MimeJSON
    getInventory =
      Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest
         GetInventory MimeNoContent (Map String Int) MimeJSON
    forall req contentType res accept.
    Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest req contentType res accept
    _mkRequest Method
    "GET" [ByteString
    "/store/inventory"]
        OpenAPIPetstoreRequest
      GetInventory MimeNoContent (Map String Int) MimeJSON
    -> Proxy AuthApiKeyApiKey
    -> OpenAPIPetstoreRequest
         GetInventory MimeNoContent (Map String Int) MimeJSON
    forall authMethod req contentType res accept.
    AuthMethod authMethod =>
    OpenAPIPetstoreRequest req contentType res accept
    -> Proxy authMethod
    -> OpenAPIPetstoreRequest req contentType res accept
    `_hasAuthType` (Proxy AuthApiKeyApiKey
    forall {k} (t :: k). Proxy t
    P.Proxy :: P.Proxy AuthApiKeyApiKey)

    data GetInventory
    -- | @application/json@
    instance Produces GetInventory MimeJSON

    -- *** getOrderById

    -- | @GET \/store\/order\/{order_id}@
    --
    -- Find purchase order by ID
    --
    -- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
    --
    getOrderById
      :: Accept accept -- ^ request accept ('MimeType')
      -> OrderId -- ^ "orderId" -  ID of pet that needs to be fetched
      -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept
    getOrderById :: forall accept.
    Accept accept
    -> OrderId
    -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept
    getOrderById  Accept accept
    _ (OrderId Integer
    orderId) =
      Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept
    forall req contentType res accept.
    Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest req contentType res accept
    _mkRequest Method
    "GET" [ByteString
    "/store/order/",Integer -> ByteString
    forall a. ToHttpApiData a => a -> ByteString
    toPath Integer
    orderId]

    data GetOrderById
    -- | @application/xml@
    instance Produces GetOrderById MimeXML
    -- | @application/json@
    instance Produces GetOrderById MimeJSON

    -- *** placeOrder

    -- | @POST \/store\/order@
    --
    -- Place an order for a pet
    --
    placeOrder
      :: (Consumes PlaceOrder contentType, MimeRender contentType Order)
      => ContentType contentType -- ^ request content-type ('MimeType')
      -> Accept accept -- ^ request accept ('MimeType')
      -> Order -- ^ "body" -  order placed for purchasing the pet
      -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept
    placeOrder :: forall contentType accept.
    (Consumes PlaceOrder contentType, MimeRender contentType Order) =>
    ContentType contentType
    -> Accept accept
    -> Order
    -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept
    placeOrder ContentType contentType
    _  Accept accept
    _ Order
    body =
      Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept
    forall req contentType res accept.
    Method
    -> [ByteString]
    -> OpenAPIPetstoreRequest req contentType res accept
    _mkRequest Method
    "POST" [ByteString
    "/store/order"]
        OpenAPIPetstoreRequest PlaceOrder contentType Order accept
    -> Order
    -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept
    forall req param contentType res accept.
    (HasBodyParam req param, Consumes req contentType,
     MimeRender contentType param) =>
    OpenAPIPetstoreRequest req contentType res accept
    -> param -> OpenAPIPetstoreRequest req contentType res accept
    forall contentType res accept.
    (Consumes PlaceOrder contentType, MimeRender contentType Order) =>
    OpenAPIPetstoreRequest PlaceOrder contentType res accept
    -> Order
    -> OpenAPIPetstoreRequest PlaceOrder contentType res accept
    `setBodyParam` Order
    body

    data PlaceOrder

    -- | /Body Param/ "body" - order placed for purchasing the pet
    instance HasBodyParam PlaceOrder Order

    -- | @*/*@
    instance MimeType mtype => Consumes PlaceOrder mtype

    -- | @application/xml@
    instance Produces PlaceOrder MimeXML
    -- | @application/json@
    instance Produces PlaceOrder MimeJSON