{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Lambda.Types.CodeSigningPolicy
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Lambda.Types.CodeSigningPolicy
  ( CodeSigningPolicy
      ( ..,
        CodeSigningPolicy_Enforce,
        CodeSigningPolicy_Warn
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype CodeSigningPolicy = CodeSigningPolicy'
  { CodeSigningPolicy -> Text
fromCodeSigningPolicy ::
      Core.Text
  }
  deriving stock
    ( Int -> CodeSigningPolicy -> ShowS
[CodeSigningPolicy] -> ShowS
CodeSigningPolicy -> String
(Int -> CodeSigningPolicy -> ShowS)
-> (CodeSigningPolicy -> String)
-> ([CodeSigningPolicy] -> ShowS)
-> Show CodeSigningPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeSigningPolicy] -> ShowS
$cshowList :: [CodeSigningPolicy] -> ShowS
show :: CodeSigningPolicy -> String
$cshow :: CodeSigningPolicy -> String
showsPrec :: Int -> CodeSigningPolicy -> ShowS
$cshowsPrec :: Int -> CodeSigningPolicy -> ShowS
Prelude.Show,
      ReadPrec [CodeSigningPolicy]
ReadPrec CodeSigningPolicy
Int -> ReadS CodeSigningPolicy
ReadS [CodeSigningPolicy]
(Int -> ReadS CodeSigningPolicy)
-> ReadS [CodeSigningPolicy]
-> ReadPrec CodeSigningPolicy
-> ReadPrec [CodeSigningPolicy]
-> Read CodeSigningPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeSigningPolicy]
$creadListPrec :: ReadPrec [CodeSigningPolicy]
readPrec :: ReadPrec CodeSigningPolicy
$creadPrec :: ReadPrec CodeSigningPolicy
readList :: ReadS [CodeSigningPolicy]
$creadList :: ReadS [CodeSigningPolicy]
readsPrec :: Int -> ReadS CodeSigningPolicy
$creadsPrec :: Int -> ReadS CodeSigningPolicy
Prelude.Read,
      CodeSigningPolicy -> CodeSigningPolicy -> Bool
(CodeSigningPolicy -> CodeSigningPolicy -> Bool)
-> (CodeSigningPolicy -> CodeSigningPolicy -> Bool)
-> Eq CodeSigningPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
$c/= :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
== :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
$c== :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
Prelude.Eq,
      Eq CodeSigningPolicy
Eq CodeSigningPolicy
-> (CodeSigningPolicy -> CodeSigningPolicy -> Ordering)
-> (CodeSigningPolicy -> CodeSigningPolicy -> Bool)
-> (CodeSigningPolicy -> CodeSigningPolicy -> Bool)
-> (CodeSigningPolicy -> CodeSigningPolicy -> Bool)
-> (CodeSigningPolicy -> CodeSigningPolicy -> Bool)
-> (CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy)
-> (CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy)
-> Ord CodeSigningPolicy
CodeSigningPolicy -> CodeSigningPolicy -> Bool
CodeSigningPolicy -> CodeSigningPolicy -> Ordering
CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy
$cmin :: CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy
max :: CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy
$cmax :: CodeSigningPolicy -> CodeSigningPolicy -> CodeSigningPolicy
>= :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
$c>= :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
> :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
$c> :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
<= :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
$c<= :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
< :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
$c< :: CodeSigningPolicy -> CodeSigningPolicy -> Bool
compare :: CodeSigningPolicy -> CodeSigningPolicy -> Ordering
$ccompare :: CodeSigningPolicy -> CodeSigningPolicy -> Ordering
$cp1Ord :: Eq CodeSigningPolicy
Prelude.Ord,
      (forall x. CodeSigningPolicy -> Rep CodeSigningPolicy x)
-> (forall x. Rep CodeSigningPolicy x -> CodeSigningPolicy)
-> Generic CodeSigningPolicy
forall x. Rep CodeSigningPolicy x -> CodeSigningPolicy
forall x. CodeSigningPolicy -> Rep CodeSigningPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeSigningPolicy x -> CodeSigningPolicy
$cfrom :: forall x. CodeSigningPolicy -> Rep CodeSigningPolicy x
Prelude.Generic
    )
  deriving newtype
    ( Int -> CodeSigningPolicy -> Int
CodeSigningPolicy -> Int
(Int -> CodeSigningPolicy -> Int)
-> (CodeSigningPolicy -> Int) -> Hashable CodeSigningPolicy
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CodeSigningPolicy -> Int
$chash :: CodeSigningPolicy -> Int
hashWithSalt :: Int -> CodeSigningPolicy -> Int
$chashWithSalt :: Int -> CodeSigningPolicy -> Int
Prelude.Hashable,
      CodeSigningPolicy -> ()
(CodeSigningPolicy -> ()) -> NFData CodeSigningPolicy
forall a. (a -> ()) -> NFData a
rnf :: CodeSigningPolicy -> ()
$crnf :: CodeSigningPolicy -> ()
Prelude.NFData,
      Text -> Either String CodeSigningPolicy
(Text -> Either String CodeSigningPolicy)
-> FromText CodeSigningPolicy
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CodeSigningPolicy
$cfromText :: Text -> Either String CodeSigningPolicy
Core.FromText,
      CodeSigningPolicy -> Text
(CodeSigningPolicy -> Text) -> ToText CodeSigningPolicy
forall a. (a -> Text) -> ToText a
toText :: CodeSigningPolicy -> Text
$ctoText :: CodeSigningPolicy -> Text
Core.ToText,
      CodeSigningPolicy -> ByteString
(CodeSigningPolicy -> ByteString) -> ToByteString CodeSigningPolicy
forall a. (a -> ByteString) -> ToByteString a
toBS :: CodeSigningPolicy -> ByteString
$ctoBS :: CodeSigningPolicy -> ByteString
Core.ToByteString,
      CodeSigningPolicy -> ByteStringBuilder
(CodeSigningPolicy -> ByteStringBuilder) -> ToLog CodeSigningPolicy
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CodeSigningPolicy -> ByteStringBuilder
$cbuild :: CodeSigningPolicy -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CodeSigningPolicy -> [Header]
(HeaderName -> CodeSigningPolicy -> [Header])
-> ToHeader CodeSigningPolicy
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CodeSigningPolicy -> [Header]
$ctoHeader :: HeaderName -> CodeSigningPolicy -> [Header]
Core.ToHeader,
      CodeSigningPolicy -> QueryString
(CodeSigningPolicy -> QueryString) -> ToQuery CodeSigningPolicy
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CodeSigningPolicy -> QueryString
$ctoQuery :: CodeSigningPolicy -> QueryString
Core.ToQuery,
      Value -> Parser [CodeSigningPolicy]
Value -> Parser CodeSigningPolicy
(Value -> Parser CodeSigningPolicy)
-> (Value -> Parser [CodeSigningPolicy])
-> FromJSON CodeSigningPolicy
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CodeSigningPolicy]
$cparseJSONList :: Value -> Parser [CodeSigningPolicy]
parseJSON :: Value -> Parser CodeSigningPolicy
$cparseJSON :: Value -> Parser CodeSigningPolicy
Core.FromJSON,
      FromJSONKeyFunction [CodeSigningPolicy]
FromJSONKeyFunction CodeSigningPolicy
FromJSONKeyFunction CodeSigningPolicy
-> FromJSONKeyFunction [CodeSigningPolicy]
-> FromJSONKey CodeSigningPolicy
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CodeSigningPolicy]
$cfromJSONKeyList :: FromJSONKeyFunction [CodeSigningPolicy]
fromJSONKey :: FromJSONKeyFunction CodeSigningPolicy
$cfromJSONKey :: FromJSONKeyFunction CodeSigningPolicy
Core.FromJSONKey,
      [CodeSigningPolicy] -> Encoding
[CodeSigningPolicy] -> Value
CodeSigningPolicy -> Encoding
CodeSigningPolicy -> Value
(CodeSigningPolicy -> Value)
-> (CodeSigningPolicy -> Encoding)
-> ([CodeSigningPolicy] -> Value)
-> ([CodeSigningPolicy] -> Encoding)
-> ToJSON CodeSigningPolicy
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CodeSigningPolicy] -> Encoding
$ctoEncodingList :: [CodeSigningPolicy] -> Encoding
toJSONList :: [CodeSigningPolicy] -> Value
$ctoJSONList :: [CodeSigningPolicy] -> Value
toEncoding :: CodeSigningPolicy -> Encoding
$ctoEncoding :: CodeSigningPolicy -> Encoding
toJSON :: CodeSigningPolicy -> Value
$ctoJSON :: CodeSigningPolicy -> Value
Core.ToJSON,
      ToJSONKeyFunction [CodeSigningPolicy]
ToJSONKeyFunction CodeSigningPolicy
ToJSONKeyFunction CodeSigningPolicy
-> ToJSONKeyFunction [CodeSigningPolicy]
-> ToJSONKey CodeSigningPolicy
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CodeSigningPolicy]
$ctoJSONKeyList :: ToJSONKeyFunction [CodeSigningPolicy]
toJSONKey :: ToJSONKeyFunction CodeSigningPolicy
$ctoJSONKey :: ToJSONKeyFunction CodeSigningPolicy
Core.ToJSONKey,
      [Node] -> Either String CodeSigningPolicy
([Node] -> Either String CodeSigningPolicy)
-> FromXML CodeSigningPolicy
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CodeSigningPolicy
$cparseXML :: [Node] -> Either String CodeSigningPolicy
Core.FromXML,
      CodeSigningPolicy -> XML
(CodeSigningPolicy -> XML) -> ToXML CodeSigningPolicy
forall a. (a -> XML) -> ToXML a
toXML :: CodeSigningPolicy -> XML
$ctoXML :: CodeSigningPolicy -> XML
Core.ToXML
    )

pattern CodeSigningPolicy_Enforce :: CodeSigningPolicy
pattern $bCodeSigningPolicy_Enforce :: CodeSigningPolicy
$mCodeSigningPolicy_Enforce :: forall r. CodeSigningPolicy -> (Void# -> r) -> (Void# -> r) -> r
CodeSigningPolicy_Enforce = CodeSigningPolicy' "Enforce"

pattern CodeSigningPolicy_Warn :: CodeSigningPolicy
pattern $bCodeSigningPolicy_Warn :: CodeSigningPolicy
$mCodeSigningPolicy_Warn :: forall r. CodeSigningPolicy -> (Void# -> r) -> (Void# -> r) -> r
CodeSigningPolicy_Warn = CodeSigningPolicy' "Warn"

{-# COMPLETE
  CodeSigningPolicy_Enforce,
  CodeSigningPolicy_Warn,
  CodeSigningPolicy'
  #-}