2018-01-11 08:19:40 +00:00
{-
Kubernetes
2019-03-11 22:43:41 -07:00
No description provided ( generated by Openapi Generator https :// github . com / openapitools / openapi - generator )
2018-01-11 08:19:40 +00:00
2019-03-11 22:43:41 -07:00
OpenAPI Version : 3.0 . 1
2024-06-13 16:56:58 -07:00
Kubernetes API version : release - 1.23
2019-03-11 22:43:41 -07:00
Generated by OpenAPI Generator ( https :// openapi - generator . tech )
2018-01-11 08:19:40 +00:00
- }
{- |
2019-01-30 13:04:51 -08:00
Module : Kubernetes . OpenAPI . API . AuthenticationV1
2018-01-11 08:19:40 +00:00
- }
{- # LANGUAGE FlexibleContexts # -}
{- # LANGUAGE FlexibleInstances # -}
{- # LANGUAGE MonoLocalBinds # -}
{- # LANGUAGE MultiParamTypeClasses # -}
{- # LANGUAGE OverloadedStrings # -}
{- # OPTIONS_GHC - fno - warn - name - shadowing - fno - warn - unused - binds - fno - warn - unused - imports # -}
2019-01-30 13:04:51 -08:00
module Kubernetes.OpenAPI.API.AuthenticationV1 where
2018-01-11 08:19:40 +00:00
2019-01-30 13:04:51 -08:00
import Kubernetes.OpenAPI.Core
import Kubernetes.OpenAPI.MimeTypes
import Kubernetes.OpenAPI.Model as M
2018-01-11 08:19:40 +00:00
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
-- ** AuthenticationV1
-- *** createTokenReview
-- | @POST \/apis\/authentication.k8s.io\/v1\/tokenreviews@
--
-- create a TokenReview
--
-- AuthMethod: 'AuthApiKeyBearerToken'
--
2021-09-14 17:01:48 -05:00
createTokenReview
2018-01-11 08:19:40 +00:00
:: ( Consumes CreateTokenReview contentType , MimeRender contentType V1TokenReview )
=> ContentType contentType -- ^ request content-type ('MimeType')
-> Accept accept -- ^ request accept ('MimeType')
-> V1TokenReview -- ^ "body"
-> KubernetesRequest CreateTokenReview contentType V1TokenReview accept
createTokenReview _ _ body =
_mkRequest " POST " [ " /apis/authentication.k8s.io/v1/tokenreviews " ]
` _hasAuthType ` ( P . Proxy :: P . Proxy AuthApiKeyBearerToken )
` setBodyParam ` body
data CreateTokenReview
instance HasBodyParam CreateTokenReview V1TokenReview
2019-03-13 07:46:12 -07:00
-- | /Optional Param/ "dryRun" - When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
instance HasOptionalParam CreateTokenReview DryRun where
applyOptionalParam req ( DryRun xs ) =
2020-10-27 15:36:28 -05:00
req ` addQuery ` toQuery ( " dryRun " , Just xs )
2019-03-13 07:46:12 -07:00
2019-05-15 00:00:06 +07:00
-- | /Optional Param/ "fieldManager" - fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
instance HasOptionalParam CreateTokenReview FieldManager where
applyOptionalParam req ( FieldManager xs ) =
2020-10-27 15:36:28 -05:00
req ` addQuery ` toQuery ( " fieldManager " , Just xs )
2019-03-13 07:46:12 -07:00
2024-06-13 16:56:58 -07:00
-- | /Optional Param/ "fieldValidation" - fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.
instance HasOptionalParam CreateTokenReview FieldValidation where
applyOptionalParam req ( FieldValidation xs ) =
req ` addQuery ` toQuery ( " fieldValidation " , Just xs )
2018-01-11 08:19:40 +00:00
-- | /Optional Param/ "pretty" - If 'true', then the output is pretty printed.
instance HasOptionalParam CreateTokenReview Pretty where
applyOptionalParam req ( Pretty xs ) =
2020-10-27 15:36:28 -05:00
req ` addQuery ` toQuery ( " pretty " , Just xs )
2021-09-14 17:01:48 -05:00
2018-01-11 08:19:40 +00:00
-- | @*/*@
instance MimeType mtype => Consumes CreateTokenReview mtype
-- | @application/json@
instance Produces CreateTokenReview MimeJSON
-- | @application/vnd.kubernetes.protobuf@
instance Produces CreateTokenReview MimeVndKubernetesProtobuf
2019-03-11 22:43:41 -07:00
-- | @application/yaml@
instance Produces CreateTokenReview MimeYaml
2018-01-11 08:19:40 +00:00
-- *** getAPIResources
-- | @GET \/apis\/authentication.k8s.io\/v1\/@
--
-- get available resources
--
-- AuthMethod: 'AuthApiKeyBearerToken'
--
2021-09-14 17:01:48 -05:00
getAPIResources
2018-01-11 08:19:40 +00:00
:: Accept accept -- ^ request accept ('MimeType')
-> KubernetesRequest GetAPIResources MimeNoContent V1APIResourceList accept
getAPIResources _ =
_mkRequest " GET " [ " /apis/authentication.k8s.io/v1/ " ]
` _hasAuthType ` ( P . Proxy :: P . Proxy AuthApiKeyBearerToken )
data GetAPIResources
-- | @application/json@
instance Produces GetAPIResources MimeJSON
-- | @application/vnd.kubernetes.protobuf@
instance Produces GetAPIResources MimeVndKubernetesProtobuf
2019-03-11 22:43:41 -07:00
-- | @application/yaml@
instance Produces GetAPIResources MimeYaml
2018-01-11 08:19:40 +00:00