{-# 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.SecurityHub.Types.NetworkDirection
-- 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.SecurityHub.Types.NetworkDirection
  ( NetworkDirection
      ( ..,
        NetworkDirection_IN,
        NetworkDirection_OUT
      ),
  )
where

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

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

pattern NetworkDirection_IN :: NetworkDirection
pattern $bNetworkDirection_IN :: NetworkDirection
$mNetworkDirection_IN :: forall r. NetworkDirection -> (Void# -> r) -> (Void# -> r) -> r
NetworkDirection_IN = NetworkDirection' "IN"

pattern NetworkDirection_OUT :: NetworkDirection
pattern $bNetworkDirection_OUT :: NetworkDirection
$mNetworkDirection_OUT :: forall r. NetworkDirection -> (Void# -> r) -> (Void# -> r) -> r
NetworkDirection_OUT = NetworkDirection' "OUT"

{-# COMPLETE
  NetworkDirection_IN,
  NetworkDirection_OUT,
  NetworkDirection'
  #-}