{-# 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.AppMesh.Types.GrpcRetryPolicyEvent
-- 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.AppMesh.Types.GrpcRetryPolicyEvent
  ( GrpcRetryPolicyEvent
      ( ..,
        GrpcRetryPolicyEvent_Cancelled,
        GrpcRetryPolicyEvent_Deadline_exceeded,
        GrpcRetryPolicyEvent_Internal,
        GrpcRetryPolicyEvent_Resource_exhausted,
        GrpcRetryPolicyEvent_Unavailable
      ),
  )
where

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

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

pattern GrpcRetryPolicyEvent_Cancelled :: GrpcRetryPolicyEvent
pattern $bGrpcRetryPolicyEvent_Cancelled :: GrpcRetryPolicyEvent
$mGrpcRetryPolicyEvent_Cancelled :: forall r. GrpcRetryPolicyEvent -> (Void# -> r) -> (Void# -> r) -> r
GrpcRetryPolicyEvent_Cancelled = GrpcRetryPolicyEvent' "cancelled"

pattern GrpcRetryPolicyEvent_Deadline_exceeded :: GrpcRetryPolicyEvent
pattern $bGrpcRetryPolicyEvent_Deadline_exceeded :: GrpcRetryPolicyEvent
$mGrpcRetryPolicyEvent_Deadline_exceeded :: forall r. GrpcRetryPolicyEvent -> (Void# -> r) -> (Void# -> r) -> r
GrpcRetryPolicyEvent_Deadline_exceeded = GrpcRetryPolicyEvent' "deadline-exceeded"

pattern GrpcRetryPolicyEvent_Internal :: GrpcRetryPolicyEvent
pattern $bGrpcRetryPolicyEvent_Internal :: GrpcRetryPolicyEvent
$mGrpcRetryPolicyEvent_Internal :: forall r. GrpcRetryPolicyEvent -> (Void# -> r) -> (Void# -> r) -> r
GrpcRetryPolicyEvent_Internal = GrpcRetryPolicyEvent' "internal"

pattern GrpcRetryPolicyEvent_Resource_exhausted :: GrpcRetryPolicyEvent
pattern $bGrpcRetryPolicyEvent_Resource_exhausted :: GrpcRetryPolicyEvent
$mGrpcRetryPolicyEvent_Resource_exhausted :: forall r. GrpcRetryPolicyEvent -> (Void# -> r) -> (Void# -> r) -> r
GrpcRetryPolicyEvent_Resource_exhausted = GrpcRetryPolicyEvent' "resource-exhausted"

pattern GrpcRetryPolicyEvent_Unavailable :: GrpcRetryPolicyEvent
pattern $bGrpcRetryPolicyEvent_Unavailable :: GrpcRetryPolicyEvent
$mGrpcRetryPolicyEvent_Unavailable :: forall r. GrpcRetryPolicyEvent -> (Void# -> r) -> (Void# -> r) -> r
GrpcRetryPolicyEvent_Unavailable = GrpcRetryPolicyEvent' "unavailable"

{-# COMPLETE
  GrpcRetryPolicyEvent_Cancelled,
  GrpcRetryPolicyEvent_Deadline_exceeded,
  GrpcRetryPolicyEvent_Internal,
  GrpcRetryPolicyEvent_Resource_exhausted,
  GrpcRetryPolicyEvent_Unavailable,
  GrpcRetryPolicyEvent'
  #-}