{-# 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.TcpRetryPolicyEvent
-- 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.TcpRetryPolicyEvent
  ( TcpRetryPolicyEvent
      ( ..,
        TcpRetryPolicyEvent_Connection_error
      ),
  )
where

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

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

pattern TcpRetryPolicyEvent_Connection_error :: TcpRetryPolicyEvent
pattern $bTcpRetryPolicyEvent_Connection_error :: TcpRetryPolicyEvent
$mTcpRetryPolicyEvent_Connection_error :: forall r. TcpRetryPolicyEvent -> (Void# -> r) -> (Void# -> r) -> r
TcpRetryPolicyEvent_Connection_error = TcpRetryPolicyEvent' "connection-error"

{-# COMPLETE
  TcpRetryPolicyEvent_Connection_error,
  TcpRetryPolicyEvent'
  #-}