{-# 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.AuthType
-- 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.AuthType
  ( AuthType
      ( ..,
        AuthType_BASIC_AUTH,
        AuthType_OAUTH,
        AuthType_PERSONAL_ACCESS_TOKEN
      ),
  )
where

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

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

pattern AuthType_BASIC_AUTH :: AuthType
pattern $bAuthType_BASIC_AUTH :: AuthType
$mAuthType_BASIC_AUTH :: forall r. AuthType -> (Void# -> r) -> (Void# -> r) -> r
AuthType_BASIC_AUTH = AuthType' "BASIC_AUTH"

pattern AuthType_OAUTH :: AuthType
pattern $bAuthType_OAUTH :: AuthType
$mAuthType_OAUTH :: forall r. AuthType -> (Void# -> r) -> (Void# -> r) -> r
AuthType_OAUTH = AuthType' "OAUTH"

pattern AuthType_PERSONAL_ACCESS_TOKEN :: AuthType
pattern $bAuthType_PERSONAL_ACCESS_TOKEN :: AuthType
$mAuthType_PERSONAL_ACCESS_TOKEN :: forall r. AuthType -> (Void# -> r) -> (Void# -> r) -> r
AuthType_PERSONAL_ACCESS_TOKEN = AuthType' "PERSONAL_ACCESS_TOKEN"

{-# COMPLETE
  AuthType_BASIC_AUTH,
  AuthType_OAUTH,
  AuthType_PERSONAL_ACCESS_TOKEN,
  AuthType'
  #-}