{-# 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.CodeBuild.Types.WebhookBuildType
-- 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.CodeBuild.Types.WebhookBuildType
  ( WebhookBuildType
      ( ..,
        WebhookBuildType_BUILD,
        WebhookBuildType_BUILD_BATCH
      ),
  )
where

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

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

pattern WebhookBuildType_BUILD :: WebhookBuildType
pattern $bWebhookBuildType_BUILD :: WebhookBuildType
$mWebhookBuildType_BUILD :: forall r. WebhookBuildType -> (Void# -> r) -> (Void# -> r) -> r
WebhookBuildType_BUILD = WebhookBuildType' "BUILD"

pattern WebhookBuildType_BUILD_BATCH :: WebhookBuildType
pattern $bWebhookBuildType_BUILD_BATCH :: WebhookBuildType
$mWebhookBuildType_BUILD_BATCH :: forall r. WebhookBuildType -> (Void# -> r) -> (Void# -> r) -> r
WebhookBuildType_BUILD_BATCH = WebhookBuildType' "BUILD_BATCH"

{-# COMPLETE
  WebhookBuildType_BUILD,
  WebhookBuildType_BUILD_BATCH,
  WebhookBuildType'
  #-}