{-# 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 Kubernetes.OpenAPI.API.AuthenticationV1beta1 where
import Kubernetes.OpenAPI.Core
import Kubernetes.OpenAPI.MimeTypes
import Kubernetes.OpenAPI.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
createTokenReview
:: (Consumes CreateTokenReview contentType, MimeRender contentType V1beta1TokenReview)
=> ContentType contentType
-> Accept accept
-> V1beta1TokenReview
-> KubernetesRequest CreateTokenReview contentType V1beta1TokenReview accept
createTokenReview _ _ body =
_mkRequest "POST" ["/apis/authentication.k8s.io/v1beta1/tokenreviews"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyBearerToken)
`setBodyParam` body
data CreateTokenReview
instance HasBodyParam CreateTokenReview V1beta1TokenReview
instance HasOptionalParam CreateTokenReview DryRun where
applyOptionalParam req (DryRun xs) =
req `setQuery` toQuery ("dryRun", Just xs)
instance HasOptionalParam CreateTokenReview FieldManager where
applyOptionalParam req (FieldManager xs) =
req `setQuery` toQuery ("fieldManager", Just xs)
instance HasOptionalParam CreateTokenReview Pretty where
applyOptionalParam req (Pretty xs) =
req `setQuery` toQuery ("pretty", Just xs)
instance MimeType mtype => Consumes CreateTokenReview mtype
instance Produces CreateTokenReview MimeJSON
instance Produces CreateTokenReview MimeVndKubernetesProtobuf
instance Produces CreateTokenReview MimeYaml
getAPIResources
:: Accept accept
-> KubernetesRequest GetAPIResources MimeNoContent V1APIResourceList accept
getAPIResources _ =
_mkRequest "GET" ["/apis/authentication.k8s.io/v1beta1/"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyBearerToken)
data GetAPIResources
instance Produces GetAPIResources MimeJSON
instance Produces GetAPIResources MimeVndKubernetesProtobuf
instance Produces GetAPIResources MimeYaml