{-# 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.DirectConnect.Types.NniPartnerType
-- 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.DirectConnect.Types.NniPartnerType
  ( NniPartnerType
      ( ..,
        NniPartnerType_NonPartner,
        NniPartnerType_V1,
        NniPartnerType_V2
      ),
  )
where

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

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

pattern NniPartnerType_NonPartner :: NniPartnerType
pattern $bNniPartnerType_NonPartner :: NniPartnerType
$mNniPartnerType_NonPartner :: forall r. NniPartnerType -> (Void# -> r) -> (Void# -> r) -> r
NniPartnerType_NonPartner = NniPartnerType' "nonPartner"

pattern NniPartnerType_V1 :: NniPartnerType
pattern $bNniPartnerType_V1 :: NniPartnerType
$mNniPartnerType_V1 :: forall r. NniPartnerType -> (Void# -> r) -> (Void# -> r) -> r
NniPartnerType_V1 = NniPartnerType' "v1"

pattern NniPartnerType_V2 :: NniPartnerType
pattern $bNniPartnerType_V2 :: NniPartnerType
$mNniPartnerType_V2 :: forall r. NniPartnerType -> (Void# -> r) -> (Void# -> r) -> r
NniPartnerType_V2 = NniPartnerType' "v2"

{-# COMPLETE
  NniPartnerType_NonPartner,
  NniPartnerType_V1,
  NniPartnerType_V2,
  NniPartnerType'
  #-}