{-# 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.AppSync.Types.ApiCachingBehavior
-- 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.AppSync.Types.ApiCachingBehavior
  ( ApiCachingBehavior
      ( ..,
        ApiCachingBehavior_FULL_REQUEST_CACHING,
        ApiCachingBehavior_PER_RESOLVER_CACHING
      ),
  )
where

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

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

pattern ApiCachingBehavior_FULL_REQUEST_CACHING :: ApiCachingBehavior
pattern $bApiCachingBehavior_FULL_REQUEST_CACHING :: ApiCachingBehavior
$mApiCachingBehavior_FULL_REQUEST_CACHING :: forall r. ApiCachingBehavior -> (Void# -> r) -> (Void# -> r) -> r
ApiCachingBehavior_FULL_REQUEST_CACHING = ApiCachingBehavior' "FULL_REQUEST_CACHING"

pattern ApiCachingBehavior_PER_RESOLVER_CACHING :: ApiCachingBehavior
pattern $bApiCachingBehavior_PER_RESOLVER_CACHING :: ApiCachingBehavior
$mApiCachingBehavior_PER_RESOLVER_CACHING :: forall r. ApiCachingBehavior -> (Void# -> r) -> (Void# -> r) -> r
ApiCachingBehavior_PER_RESOLVER_CACHING = ApiCachingBehavior' "PER_RESOLVER_CACHING"

{-# COMPLETE
  ApiCachingBehavior_FULL_REQUEST_CACHING,
  ApiCachingBehavior_PER_RESOLVER_CACHING,
  ApiCachingBehavior'
  #-}