{-# 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.Lightsail.Types.AccessDirection
-- 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.Lightsail.Types.AccessDirection
  ( AccessDirection
      ( ..,
        AccessDirection_Inbound,
        AccessDirection_Outbound
      ),
  )
where

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

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

pattern AccessDirection_Inbound :: AccessDirection
pattern $bAccessDirection_Inbound :: AccessDirection
$mAccessDirection_Inbound :: forall r. AccessDirection -> (Void# -> r) -> (Void# -> r) -> r
AccessDirection_Inbound = AccessDirection' "inbound"

pattern AccessDirection_Outbound :: AccessDirection
pattern $bAccessDirection_Outbound :: AccessDirection
$mAccessDirection_Outbound :: forall r. AccessDirection -> (Void# -> r) -> (Void# -> r) -> r
AccessDirection_Outbound = AccessDirection' "outbound"

{-# COMPLETE
  AccessDirection_Inbound,
  AccessDirection_Outbound,
  AccessDirection'
  #-}