{-# 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.SourceAuthType
-- 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.SourceAuthType
  ( SourceAuthType
      ( ..,
        SourceAuthType_OAUTH
      ),
  )
where

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

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

pattern SourceAuthType_OAUTH :: SourceAuthType
pattern $bSourceAuthType_OAUTH :: SourceAuthType
$mSourceAuthType_OAUTH :: forall r. SourceAuthType -> (Void# -> r) -> (Void# -> r) -> r
SourceAuthType_OAUTH = SourceAuthType' "OAUTH"

{-# COMPLETE
  SourceAuthType_OAUTH,
  SourceAuthType'
  #-}