{-# 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.EC2.Types.TrafficDirection
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.TrafficDirection
  ( TrafficDirection
      ( ..,
        TrafficDirection_Egress,
        TrafficDirection_Ingress
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

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

pattern TrafficDirection_Egress :: TrafficDirection
pattern $bTrafficDirection_Egress :: TrafficDirection
$mTrafficDirection_Egress :: forall {r}. TrafficDirection -> ((# #) -> r) -> ((# #) -> r) -> r
TrafficDirection_Egress = TrafficDirection' "egress"

pattern TrafficDirection_Ingress :: TrafficDirection
pattern $bTrafficDirection_Ingress :: TrafficDirection
$mTrafficDirection_Ingress :: forall {r}. TrafficDirection -> ((# #) -> r) -> ((# #) -> r) -> r
TrafficDirection_Ingress = TrafficDirection' "ingress"

{-# COMPLETE
  TrafficDirection_Egress,
  TrafficDirection_Ingress,
  TrafficDirection'
  #-}