{-# 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.CacheType
-- 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.CacheType
  ( CacheType
      ( ..,
        CacheType_LOCAL,
        CacheType_NO_CACHE,
        CacheType_S3
      ),
  )
where

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

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

pattern CacheType_LOCAL :: CacheType
pattern $bCacheType_LOCAL :: CacheType
$mCacheType_LOCAL :: forall r. CacheType -> (Void# -> r) -> (Void# -> r) -> r
CacheType_LOCAL = CacheType' "LOCAL"

pattern CacheType_NO_CACHE :: CacheType
pattern $bCacheType_NO_CACHE :: CacheType
$mCacheType_NO_CACHE :: forall r. CacheType -> (Void# -> r) -> (Void# -> r) -> r
CacheType_NO_CACHE = CacheType' "NO_CACHE"

pattern CacheType_S3 :: CacheType
pattern $bCacheType_S3 :: CacheType
$mCacheType_S3 :: forall r. CacheType -> (Void# -> r) -> (Void# -> r) -> r
CacheType_S3 = CacheType' "S3"

{-# COMPLETE
  CacheType_LOCAL,
  CacheType_NO_CACHE,
  CacheType_S3,
  CacheType'
  #-}