{-# 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.DirectoryService.Types.TrustDirection
-- 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.DirectoryService.Types.TrustDirection
  ( TrustDirection
      ( ..,
        TrustDirection_One_Way__Incoming,
        TrustDirection_One_Way__Outgoing,
        TrustDirection_Two_Way
      ),
  )
where

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

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

pattern TrustDirection_One_Way__Incoming :: TrustDirection
pattern $bTrustDirection_One_Way__Incoming :: TrustDirection
$mTrustDirection_One_Way__Incoming :: forall r. TrustDirection -> (Void# -> r) -> (Void# -> r) -> r
TrustDirection_One_Way__Incoming = TrustDirection' "One-Way: Incoming"

pattern TrustDirection_One_Way__Outgoing :: TrustDirection
pattern $bTrustDirection_One_Way__Outgoing :: TrustDirection
$mTrustDirection_One_Way__Outgoing :: forall r. TrustDirection -> (Void# -> r) -> (Void# -> r) -> r
TrustDirection_One_Way__Outgoing = TrustDirection' "One-Way: Outgoing"

pattern TrustDirection_Two_Way :: TrustDirection
pattern $bTrustDirection_Two_Way :: TrustDirection
$mTrustDirection_Two_Way :: forall r. TrustDirection -> (Void# -> r) -> (Void# -> r) -> r
TrustDirection_Two_Way = TrustDirection' "Two-Way"

{-# COMPLETE
  TrustDirection_One_Way__Incoming,
  TrustDirection_One_Way__Outgoing,
  TrustDirection_Two_Way,
  TrustDirection'
  #-}