hercules-ci-api-0.8.2.0: src/Hercules/API/State/StateLockAcquireRequest.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
module Hercules.API.State.StateLockAcquireRequest where
import Data.OpenApi qualified as O3
import Hercules.API.Prelude
data StateLockAcquireRequest = StateLockAcquireRequest
{ -- | A description of the activity that the lock is for. This may appear in
-- logs when other clients are blocked.
description :: Text,
-- | @True@ to request an exclusive lock. Non-exclusive locks are only mutually exclusive with exclusive locks.
exclusive :: Bool,
-- | For recursive locking. Set this to the value of environment variable
-- HERCULES_CI_LOCK_LEASE_ID when present.
parent :: Maybe (Id "StateLockLease"),
-- | Generate a random key to make sure that a retry can be successful.
idempotencyKey :: Maybe (Id "IdempotencyKey")
}
deriving (Generic, Show, Eq)
deriving anyclass (NFData, ToJSON, FromJSON, ToSchema, O3.ToSchema)