{-
   Swaggy Jenkins

   Jenkins API clients generated from Swagger / Open API specification

   OpenAPI Version: 3.0.0
   Swaggy Jenkins API version: 1.1.2-pre.0
   Contact: blah@cliffano.com
   Generated by OpenAPI Generator (https://openapi-generator.tech)
-}

{-|
Module : SwaggyJenkins.API.BlueOcean
-}

{-# 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 SwaggyJenkins.API.BlueOcean where

import SwaggyJenkins.Core
import SwaggyJenkins.MimeTypes
import SwaggyJenkins.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


-- ** BlueOcean

-- *** deletePipelineQueueItem

-- | @DELETE \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/queue\/{queue}@
-- 
-- Delete queue item from an organization pipeline queue
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
deletePipelineQueueItem
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Queue2 -- ^ "queue" -  Name of the queue item
  -> SwaggyJenkinsRequest DeletePipelineQueueItem MimeNoContent NoContent MimeNoContent
deletePipelineQueueItem (Organization organization) (Pipeline2 pipeline) (Queue2 queue) =
  _mkRequest "DELETE" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/queue/",toPath queue]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

data DeletePipelineQueueItem  
instance Produces DeletePipelineQueueItem MimeNoContent


-- *** getAuthenticatedUser

-- | @GET \/blue\/rest\/organizations\/{organization}\/user\/@
-- 
-- Retrieve authenticated user details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getAuthenticatedUser
  :: Organization -- ^ "organization" -  Name of the organization
  -> SwaggyJenkinsRequest GetAuthenticatedUser MimeNoContent User MimeJSON
getAuthenticatedUser (Organization organization) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/user/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getClasses

-- | @GET \/blue\/rest\/classes\/{class}@
-- 
-- Get a list of class names supported by a given class
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getClasses
  :: ParamClass -- ^ "_class" -  Name of the class
  -> SwaggyJenkinsRequest GetClasses MimeNoContent Text MimeJSON
getClasses (ParamClass _class) =
  _mkRequest "GET" ["/blue/rest/classes/",toPath _class]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getJsonWebKey

-- | @GET \/jwt-auth\/jwks\/{key}@
-- 
-- Retrieve JSON Web Key
-- 
getJsonWebKey
  :: Key -- ^ "key" -  Key ID received as part of JWT header field kid
  -> SwaggyJenkinsRequest GetJsonWebKey MimeNoContent Text MimeJSON
getJsonWebKey (Key key) =
  _mkRequest "GET" ["/jwt-auth/jwks/",toPath key]

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


-- *** getJsonWebToken

-- | @GET \/jwt-auth\/token@
-- 
-- Retrieve JSON Web Token
-- 
getJsonWebToken
  :: SwaggyJenkinsRequest GetJsonWebToken MimeNoContent Text MimeJSON
getJsonWebToken =
  _mkRequest "GET" ["/jwt-auth/token"]

data GetJsonWebToken  

-- | /Optional Param/ "expiryTimeInMins" - Token expiry time in minutes, default: 30 minutes
instance HasOptionalParam GetJsonWebToken ExpiryTimeInMins where
  applyOptionalParam req (ExpiryTimeInMins xs) =
    req `addQuery` toQuery ("expiryTimeInMins", Just xs)

-- | /Optional Param/ "maxExpiryTimeInMins" - Maximum token expiry time in minutes, default: 480 minutes
instance HasOptionalParam GetJsonWebToken MaxExpiryTimeInMins where
  applyOptionalParam req (MaxExpiryTimeInMins xs) =
    req `addQuery` toQuery ("maxExpiryTimeInMins", Just xs)
-- | @application/json@
instance Produces GetJsonWebToken MimeJSON


-- *** getOrganisation

-- | @GET \/blue\/rest\/organizations\/{organization}@
-- 
-- Retrieve organization details
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getOrganisation
  :: Organization -- ^ "organization" -  Name of the organization
  -> SwaggyJenkinsRequest GetOrganisation MimeNoContent Organisation MimeJSON
getOrganisation (Organization organization) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getOrganisations

-- | @GET \/blue\/rest\/organizations\/@
-- 
-- Retrieve all organizations details
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getOrganisations
  :: SwaggyJenkinsRequest GetOrganisations MimeNoContent [Organisation] MimeJSON
getOrganisations =
  _mkRequest "GET" ["/blue/rest/organizations/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipeline

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}@
-- 
-- Retrieve pipeline details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipeline
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest GetPipeline MimeNoContent Pipeline MimeJSON
getPipeline (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineActivities

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/activities@
-- 
-- Retrieve all activities details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineActivities
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest GetPipelineActivities MimeNoContent [PipelineActivity] MimeJSON
getPipelineActivities (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/activities"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineBranch

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/branches\/{branch}\/@
-- 
-- Retrieve branch details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineBranch
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Branch -- ^ "branch" -  Name of the branch
  -> SwaggyJenkinsRequest GetPipelineBranch MimeNoContent BranchImpl MimeJSON
getPipelineBranch (Organization organization) (Pipeline2 pipeline) (Branch branch) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/branches/",toPath branch,"/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineBranchRun

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/branches\/{branch}\/runs\/{run}@
-- 
-- Retrieve branch run details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineBranchRun
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Branch -- ^ "branch" -  Name of the branch
  -> Run -- ^ "run" -  Name of the run
  -> SwaggyJenkinsRequest GetPipelineBranchRun MimeNoContent PipelineRun MimeJSON
getPipelineBranchRun (Organization organization) (Pipeline2 pipeline) (Branch branch) (Run run) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/branches/",toPath branch,"/runs/",toPath run]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineBranches

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/branches@
-- 
-- Retrieve all branches details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineBranches
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest GetPipelineBranches MimeNoContent MultibranchPipeline MimeJSON
getPipelineBranches (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/branches"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineFolder

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{folder}\/@
-- 
-- Retrieve pipeline folder for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineFolder
  :: Organization -- ^ "organization" -  Name of the organization
  -> Folder -- ^ "folder" -  Name of the folder
  -> SwaggyJenkinsRequest GetPipelineFolder MimeNoContent PipelineFolderImpl MimeJSON
getPipelineFolder (Organization organization) (Folder folder) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath folder,"/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineFolderPipeline

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{folder}\/pipelines\/{pipeline}@
-- 
-- Retrieve pipeline details for an organization folder
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineFolderPipeline
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Folder -- ^ "folder" -  Name of the folder
  -> SwaggyJenkinsRequest GetPipelineFolderPipeline MimeNoContent PipelineImpl MimeJSON
getPipelineFolderPipeline (Organization organization) (Pipeline2 pipeline) (Folder folder) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath folder,"/pipelines/",toPath pipeline]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineQueue

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/queue@
-- 
-- Retrieve queue details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineQueue
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest GetPipelineQueue MimeNoContent [QueueItemImpl] MimeJSON
getPipelineQueue (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/queue"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRun

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}@
-- 
-- Retrieve run details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRun
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> SwaggyJenkinsRequest GetPipelineRun MimeNoContent PipelineRun MimeJSON
getPipelineRun (Organization organization) (Pipeline2 pipeline) (Run run) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRunLog

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/log@
-- 
-- Get log for a pipeline run
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRunLog
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> SwaggyJenkinsRequest GetPipelineRunLog MimeNoContent Text MimeJSON
getPipelineRunLog (Organization organization) (Pipeline2 pipeline) (Run run) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/log"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

data GetPipelineRunLog  

-- | /Optional Param/ "start" - Start position of the log
instance HasOptionalParam GetPipelineRunLog StartInt where
  applyOptionalParam req (StartInt xs) =
    req `addQuery` toQuery ("start", Just xs)

-- | /Optional Param/ "download" - Set to true in order to download the file, otherwise it's passed as a response body
instance HasOptionalParam GetPipelineRunLog Download where
  applyOptionalParam req (Download xs) =
    req `addQuery` toQuery ("download", Just xs)
-- | @application/json@
instance Produces GetPipelineRunLog MimeJSON


-- *** getPipelineRunNode

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/nodes\/{node}@
-- 
-- Retrieve run node details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRunNode
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> Node -- ^ "node" -  Name of the node
  -> SwaggyJenkinsRequest GetPipelineRunNode MimeNoContent PipelineRunNode MimeJSON
getPipelineRunNode (Organization organization) (Pipeline2 pipeline) (Run run) (Node node) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/nodes/",toPath node]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRunNodeStep

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/nodes\/{node}\/steps\/{step}@
-- 
-- Retrieve run node details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRunNodeStep
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> Node -- ^ "node" -  Name of the node
  -> Step -- ^ "step" -  Name of the step
  -> SwaggyJenkinsRequest GetPipelineRunNodeStep MimeNoContent PipelineStepImpl MimeJSON
getPipelineRunNodeStep (Organization organization) (Pipeline2 pipeline) (Run run) (Node node) (Step step) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/nodes/",toPath node,"/steps/",toPath step]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRunNodeStepLog

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/nodes\/{node}\/steps\/{step}\/log@
-- 
-- Get log for a pipeline run node step
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRunNodeStepLog
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> Node -- ^ "node" -  Name of the node
  -> Step -- ^ "step" -  Name of the step
  -> SwaggyJenkinsRequest GetPipelineRunNodeStepLog MimeNoContent Text MimeJSON
getPipelineRunNodeStepLog (Organization organization) (Pipeline2 pipeline) (Run run) (Node node) (Step step) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/nodes/",toPath node,"/steps/",toPath step,"/log"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRunNodeSteps

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/nodes\/{node}\/steps@
-- 
-- Retrieve run node steps details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRunNodeSteps
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> Node -- ^ "node" -  Name of the node
  -> SwaggyJenkinsRequest GetPipelineRunNodeSteps MimeNoContent [PipelineStepImpl] MimeJSON
getPipelineRunNodeSteps (Organization organization) (Pipeline2 pipeline) (Run run) (Node node) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/nodes/",toPath node,"/steps"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRunNodes

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/nodes@
-- 
-- Retrieve run nodes details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRunNodes
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> SwaggyJenkinsRequest GetPipelineRunNodes MimeNoContent [PipelineRunNode] MimeJSON
getPipelineRunNodes (Organization organization) (Pipeline2 pipeline) (Run run) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/nodes"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelineRuns

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs@
-- 
-- Retrieve all runs details for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelineRuns
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest GetPipelineRuns MimeNoContent [PipelineRun] MimeJSON
getPipelineRuns (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getPipelines

-- | @GET \/blue\/rest\/organizations\/{organization}\/pipelines\/@
-- 
-- Retrieve all pipelines details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getPipelines
  :: Organization -- ^ "organization" -  Name of the organization
  -> SwaggyJenkinsRequest GetPipelines MimeNoContent [Pipeline] MimeJSON
getPipelines (Organization organization) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/pipelines/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getSCM

-- | @GET \/blue\/rest\/organizations\/{organization}\/scm\/{scm}@
-- 
-- Retrieve SCM details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getSCM
  :: Organization -- ^ "organization" -  Name of the organization
  -> Scm -- ^ "scm" -  Name of SCM
  -> SwaggyJenkinsRequest GetSCM MimeNoContent GithubScm MimeJSON
getSCM (Organization organization) (Scm scm) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/scm/",toPath scm]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getSCMOrganisationRepositories

-- | @GET \/blue\/rest\/organizations\/{organization}\/scm\/{scm}\/organizations\/{scmOrganisation}\/repositories@
-- 
-- Retrieve SCM organization repositories details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getSCMOrganisationRepositories
  :: Organization -- ^ "organization" -  Name of the organization
  -> Scm -- ^ "scm" -  Name of SCM
  -> ScmOrganisation -- ^ "scmOrganisation" -  Name of the SCM organization
  -> SwaggyJenkinsRequest GetSCMOrganisationRepositories MimeNoContent [GithubOrganization] MimeJSON
getSCMOrganisationRepositories (Organization organization) (Scm scm) (ScmOrganisation scmOrganisation) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/scm/",toPath scm,"/organizations/",toPath scmOrganisation,"/repositories"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

data GetSCMOrganisationRepositories  

-- | /Optional Param/ "credentialId" - Credential ID
instance HasOptionalParam GetSCMOrganisationRepositories CredentialId where
  applyOptionalParam req (CredentialId xs) =
    req `addQuery` toQuery ("credentialId", Just xs)

-- | /Optional Param/ "pageSize" - Number of items in a page
instance HasOptionalParam GetSCMOrganisationRepositories PageSize where
  applyOptionalParam req (PageSize xs) =
    req `addQuery` toQuery ("pageSize", Just xs)

-- | /Optional Param/ "pageNumber" - Page number
instance HasOptionalParam GetSCMOrganisationRepositories PageNumber where
  applyOptionalParam req (PageNumber xs) =
    req `addQuery` toQuery ("pageNumber", Just xs)
-- | @application/json@
instance Produces GetSCMOrganisationRepositories MimeJSON


-- *** getSCMOrganisationRepository

-- | @GET \/blue\/rest\/organizations\/{organization}\/scm\/{scm}\/organizations\/{scmOrganisation}\/repositories\/{repository}@
-- 
-- Retrieve SCM organization repository details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getSCMOrganisationRepository
  :: Organization -- ^ "organization" -  Name of the organization
  -> Scm -- ^ "scm" -  Name of SCM
  -> ScmOrganisation -- ^ "scmOrganisation" -  Name of the SCM organization
  -> Repository -- ^ "repository" -  Name of the SCM repository
  -> SwaggyJenkinsRequest GetSCMOrganisationRepository MimeNoContent [GithubOrganization] MimeJSON
getSCMOrganisationRepository (Organization organization) (Scm scm) (ScmOrganisation scmOrganisation) (Repository repository) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/scm/",toPath scm,"/organizations/",toPath scmOrganisation,"/repositories/",toPath repository]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

data GetSCMOrganisationRepository  

-- | /Optional Param/ "credentialId" - Credential ID
instance HasOptionalParam GetSCMOrganisationRepository CredentialId where
  applyOptionalParam req (CredentialId xs) =
    req `addQuery` toQuery ("credentialId", Just xs)
-- | @application/json@
instance Produces GetSCMOrganisationRepository MimeJSON


-- *** getSCMOrganisations

-- | @GET \/blue\/rest\/organizations\/{organization}\/scm\/{scm}\/organizations@
-- 
-- Retrieve SCM organizations details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getSCMOrganisations
  :: Organization -- ^ "organization" -  Name of the organization
  -> Scm -- ^ "scm" -  Name of SCM
  -> SwaggyJenkinsRequest GetSCMOrganisations MimeNoContent [GithubOrganization] MimeJSON
getSCMOrganisations (Organization organization) (Scm scm) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/scm/",toPath scm,"/organizations"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

data GetSCMOrganisations  

-- | /Optional Param/ "credentialId" - Credential ID
instance HasOptionalParam GetSCMOrganisations CredentialId where
  applyOptionalParam req (CredentialId xs) =
    req `addQuery` toQuery ("credentialId", Just xs)
-- | @application/json@
instance Produces GetSCMOrganisations MimeJSON


-- *** getUser

-- | @GET \/blue\/rest\/organizations\/{organization}\/users\/{user}@
-- 
-- Retrieve user details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getUser
  :: Organization -- ^ "organization" -  Name of the organization
  -> User2 -- ^ "user" -  Name of the user
  -> SwaggyJenkinsRequest GetUser MimeNoContent User MimeJSON
getUser (Organization organization) (User2 user) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/users/",toPath user]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getUserFavorites

-- | @GET \/blue\/rest\/users\/{user}\/favorites@
-- 
-- Retrieve user favorites details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getUserFavorites
  :: User2 -- ^ "user" -  Name of the user
  -> SwaggyJenkinsRequest GetUserFavorites MimeNoContent [FavoriteImpl] MimeJSON
getUserFavorites (User2 user) =
  _mkRequest "GET" ["/blue/rest/users/",toPath user,"/favorites"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** getUsers

-- | @GET \/blue\/rest\/organizations\/{organization}\/users\/@
-- 
-- Retrieve users details for an organization
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
getUsers
  :: Organization -- ^ "organization" -  Name of the organization
  -> SwaggyJenkinsRequest GetUsers MimeNoContent User MimeJSON
getUsers (Organization organization) =
  _mkRequest "GET" ["/blue/rest/organizations/",toPath organization,"/users/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** postPipelineRun

-- | @POST \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/replay@
-- 
-- Replay an organization pipeline run
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
postPipelineRun
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> SwaggyJenkinsRequest PostPipelineRun MimeNoContent QueueItemImpl MimeJSON
postPipelineRun (Organization organization) (Pipeline2 pipeline) (Run run) =
  _mkRequest "POST" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/replay"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** postPipelineRuns

-- | @POST \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs@
-- 
-- Start a build for an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
postPipelineRuns
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest PostPipelineRuns MimeNoContent QueueItemImpl MimeJSON
postPipelineRuns (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "POST" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

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


-- *** putPipelineFavorite

-- | @PUT \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/favorite@
-- 
-- Favorite/unfavorite a pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
putPipelineFavorite
  :: (Consumes PutPipelineFavorite MimeJSON, MimeRender MimeJSON BodyBool)
  => BodyBool -- ^ "body" -  Set JSON string body to {\"favorite\": true} to favorite, set value to false to unfavorite
  -> Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> SwaggyJenkinsRequest PutPipelineFavorite MimeJSON FavoriteImpl MimeJSON
putPipelineFavorite body (Organization organization) (Pipeline2 pipeline) =
  _mkRequest "PUT" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/favorite"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)
    `setBodyParam` body

data PutPipelineFavorite 

-- | /Body Param/ "body" - Set JSON string body to {\"favorite\": true} to favorite, set value to false to unfavorite
instance HasBodyParam PutPipelineFavorite BodyBool 

-- | @application/json@
instance Consumes PutPipelineFavorite MimeJSON

-- | @application/json@
instance Produces PutPipelineFavorite MimeJSON


-- *** putPipelineRun

-- | @PUT \/blue\/rest\/organizations\/{organization}\/pipelines\/{pipeline}\/runs\/{run}\/stop@
-- 
-- Stop a build of an organization pipeline
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
putPipelineRun
  :: Organization -- ^ "organization" -  Name of the organization
  -> Pipeline2 -- ^ "pipeline" -  Name of the pipeline
  -> Run -- ^ "run" -  Name of the run
  -> SwaggyJenkinsRequest PutPipelineRun MimeNoContent PipelineRun MimeJSON
putPipelineRun (Organization organization) (Pipeline2 pipeline) (Run run) =
  _mkRequest "PUT" ["/blue/rest/organizations/",toPath organization,"/pipelines/",toPath pipeline,"/runs/",toPath run,"/stop"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)

data PutPipelineRun  

-- | /Optional Param/ "blocking" - Set to true to make blocking stop, default: false
instance HasOptionalParam PutPipelineRun Blocking where
  applyOptionalParam req (Blocking xs) =
    req `addQuery` toQuery ("blocking", Just xs)

-- | /Optional Param/ "timeOutInSecs" - Timeout in seconds, default: 10 seconds
instance HasOptionalParam PutPipelineRun TimeOutInSecs where
  applyOptionalParam req (TimeOutInSecs xs) =
    req `addQuery` toQuery ("timeOutInSecs", Just xs)
-- | @application/json@
instance Produces PutPipelineRun MimeJSON


-- *** search

-- | @GET \/blue\/rest\/search\/@
-- 
-- Search for any resource details
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
search
  :: Q -- ^ "q" -  Query string
  -> SwaggyJenkinsRequest Search MimeNoContent Text MimeJSON
search (Q q) =
  _mkRequest "GET" ["/blue/rest/search/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)
    `addQuery` toQuery ("q", Just q)

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


-- *** searchClasses

-- | @GET \/blue\/rest\/classes\/@
-- 
-- Get classes details
-- 
-- AuthMethod: 'AuthBasicJenkinsAuth'
-- 
searchClasses
  :: Q -- ^ "q" -  Query string containing an array of class names
  -> SwaggyJenkinsRequest SearchClasses MimeNoContent Text MimeJSON
searchClasses (Q q) =
  _mkRequest "GET" ["/blue/rest/classes/"]
    `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJenkinsAuth)
    `addQuery` toQuery ("q", Just q)

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

