{-# 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.ApiGatewayV2.Types.PassthroughBehavior
-- 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.ApiGatewayV2.Types.PassthroughBehavior
  ( PassthroughBehavior
      ( ..,
        PassthroughBehavior_NEVER,
        PassthroughBehavior_WHEN_NO_MATCH,
        PassthroughBehavior_WHEN_NO_TEMPLATES
      ),
  )
where

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

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

pattern PassthroughBehavior_NEVER :: PassthroughBehavior
pattern $bPassthroughBehavior_NEVER :: PassthroughBehavior
$mPassthroughBehavior_NEVER :: forall r. PassthroughBehavior -> (Void# -> r) -> (Void# -> r) -> r
PassthroughBehavior_NEVER = PassthroughBehavior' "NEVER"

pattern PassthroughBehavior_WHEN_NO_MATCH :: PassthroughBehavior
pattern $bPassthroughBehavior_WHEN_NO_MATCH :: PassthroughBehavior
$mPassthroughBehavior_WHEN_NO_MATCH :: forall r. PassthroughBehavior -> (Void# -> r) -> (Void# -> r) -> r
PassthroughBehavior_WHEN_NO_MATCH = PassthroughBehavior' "WHEN_NO_MATCH"

pattern PassthroughBehavior_WHEN_NO_TEMPLATES :: PassthroughBehavior
pattern $bPassthroughBehavior_WHEN_NO_TEMPLATES :: PassthroughBehavior
$mPassthroughBehavior_WHEN_NO_TEMPLATES :: forall r. PassthroughBehavior -> (Void# -> r) -> (Void# -> r) -> r
PassthroughBehavior_WHEN_NO_TEMPLATES = PassthroughBehavior' "WHEN_NO_TEMPLATES"

{-# COMPLETE
  PassthroughBehavior_NEVER,
  PassthroughBehavior_WHEN_NO_MATCH,
  PassthroughBehavior_WHEN_NO_TEMPLATES,
  PassthroughBehavior'
  #-}