module Cachix.Types.SigningKeyCreate
  ( SigningKeyCreate (..),
  )
where

import Data.Aeson
  ( FromJSON,
    ToJSON,
  )
import Data.Swagger
import Protolude

-- | Conveys that a signing secret key was created, by sharing the public key.
newtype SigningKeyCreate = SigningKeyCreate
  { SigningKeyCreate -> Text
publicKey :: Text
  }
  deriving (Int -> SigningKeyCreate -> ShowS
[SigningKeyCreate] -> ShowS
SigningKeyCreate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigningKeyCreate] -> ShowS
$cshowList :: [SigningKeyCreate] -> ShowS
show :: SigningKeyCreate -> String
$cshow :: SigningKeyCreate -> String
showsPrec :: Int -> SigningKeyCreate -> ShowS
$cshowsPrec :: Int -> SigningKeyCreate -> ShowS
Show, forall x. Rep SigningKeyCreate x -> SigningKeyCreate
forall x. SigningKeyCreate -> Rep SigningKeyCreate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SigningKeyCreate x -> SigningKeyCreate
$cfrom :: forall x. SigningKeyCreate -> Rep SigningKeyCreate x
Generic, Value -> Parser [SigningKeyCreate]
Value -> Parser SigningKeyCreate
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SigningKeyCreate]
$cparseJSONList :: Value -> Parser [SigningKeyCreate]
parseJSON :: Value -> Parser SigningKeyCreate
$cparseJSON :: Value -> Parser SigningKeyCreate
FromJSON, [SigningKeyCreate] -> Encoding
[SigningKeyCreate] -> Value
SigningKeyCreate -> Encoding
SigningKeyCreate -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SigningKeyCreate] -> Encoding
$ctoEncodingList :: [SigningKeyCreate] -> Encoding
toJSONList :: [SigningKeyCreate] -> Value
$ctoJSONList :: [SigningKeyCreate] -> Value
toEncoding :: SigningKeyCreate -> Encoding
$ctoEncoding :: SigningKeyCreate -> Encoding
toJSON :: SigningKeyCreate -> Value
$ctoJSON :: SigningKeyCreate -> Value
ToJSON, Proxy SigningKeyCreate -> Declare (Definitions Schema) NamedSchema
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy SigningKeyCreate -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy SigningKeyCreate -> Declare (Definitions Schema) NamedSchema
ToSchema)