{-# 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.ApiCacheStatus
-- 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.ApiCacheStatus
  ( ApiCacheStatus
      ( ..,
        ApiCacheStatus_AVAILABLE,
        ApiCacheStatus_CREATING,
        ApiCacheStatus_DELETING,
        ApiCacheStatus_FAILED,
        ApiCacheStatus_MODIFYING
      ),
  )
where

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

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

pattern ApiCacheStatus_AVAILABLE :: ApiCacheStatus
pattern $bApiCacheStatus_AVAILABLE :: ApiCacheStatus
$mApiCacheStatus_AVAILABLE :: forall r. ApiCacheStatus -> (Void# -> r) -> (Void# -> r) -> r
ApiCacheStatus_AVAILABLE = ApiCacheStatus' "AVAILABLE"

pattern ApiCacheStatus_CREATING :: ApiCacheStatus
pattern $bApiCacheStatus_CREATING :: ApiCacheStatus
$mApiCacheStatus_CREATING :: forall r. ApiCacheStatus -> (Void# -> r) -> (Void# -> r) -> r
ApiCacheStatus_CREATING = ApiCacheStatus' "CREATING"

pattern ApiCacheStatus_DELETING :: ApiCacheStatus
pattern $bApiCacheStatus_DELETING :: ApiCacheStatus
$mApiCacheStatus_DELETING :: forall r. ApiCacheStatus -> (Void# -> r) -> (Void# -> r) -> r
ApiCacheStatus_DELETING = ApiCacheStatus' "DELETING"

pattern ApiCacheStatus_FAILED :: ApiCacheStatus
pattern $bApiCacheStatus_FAILED :: ApiCacheStatus
$mApiCacheStatus_FAILED :: forall r. ApiCacheStatus -> (Void# -> r) -> (Void# -> r) -> r
ApiCacheStatus_FAILED = ApiCacheStatus' "FAILED"

pattern ApiCacheStatus_MODIFYING :: ApiCacheStatus
pattern $bApiCacheStatus_MODIFYING :: ApiCacheStatus
$mApiCacheStatus_MODIFYING :: forall r. ApiCacheStatus -> (Void# -> r) -> (Void# -> r) -> r
ApiCacheStatus_MODIFYING = ApiCacheStatus' "MODIFYING"

{-# COMPLETE
  ApiCacheStatus_AVAILABLE,
  ApiCacheStatus_CREATING,
  ApiCacheStatus_DELETING,
  ApiCacheStatus_FAILED,
  ApiCacheStatus_MODIFYING,
  ApiCacheStatus'
  #-}