{-# 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.CacheMode
-- 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.CacheMode
  ( CacheMode
      ( ..,
        CacheMode_LOCAL_CUSTOM_CACHE,
        CacheMode_LOCAL_DOCKER_LAYER_CACHE,
        CacheMode_LOCAL_SOURCE_CACHE
      ),
  )
where

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

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

pattern CacheMode_LOCAL_CUSTOM_CACHE :: CacheMode
pattern $bCacheMode_LOCAL_CUSTOM_CACHE :: CacheMode
$mCacheMode_LOCAL_CUSTOM_CACHE :: forall r. CacheMode -> (Void# -> r) -> (Void# -> r) -> r
CacheMode_LOCAL_CUSTOM_CACHE = CacheMode' "LOCAL_CUSTOM_CACHE"

pattern CacheMode_LOCAL_DOCKER_LAYER_CACHE :: CacheMode
pattern $bCacheMode_LOCAL_DOCKER_LAYER_CACHE :: CacheMode
$mCacheMode_LOCAL_DOCKER_LAYER_CACHE :: forall r. CacheMode -> (Void# -> r) -> (Void# -> r) -> r
CacheMode_LOCAL_DOCKER_LAYER_CACHE = CacheMode' "LOCAL_DOCKER_LAYER_CACHE"

pattern CacheMode_LOCAL_SOURCE_CACHE :: CacheMode
pattern $bCacheMode_LOCAL_SOURCE_CACHE :: CacheMode
$mCacheMode_LOCAL_SOURCE_CACHE :: forall r. CacheMode -> (Void# -> r) -> (Void# -> r) -> r
CacheMode_LOCAL_SOURCE_CACHE = CacheMode' "LOCAL_SOURCE_CACHE"

{-# COMPLETE
  CacheMode_LOCAL_CUSTOM_CACHE,
  CacheMode_LOCAL_DOCKER_LAYER_CACHE,
  CacheMode_LOCAL_SOURCE_CACHE,
  CacheMode'
  #-}