{-# 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.InterfaceProtocolType
-- 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.InterfaceProtocolType
  ( InterfaceProtocolType
      ( ..,
        InterfaceProtocolType_GRE,
        InterfaceProtocolType_VLAN
      ),
  )
where

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

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

pattern InterfaceProtocolType_GRE :: InterfaceProtocolType
pattern $bInterfaceProtocolType_GRE :: InterfaceProtocolType
$mInterfaceProtocolType_GRE :: forall {r}.
InterfaceProtocolType -> ((# #) -> r) -> ((# #) -> r) -> r
InterfaceProtocolType_GRE = InterfaceProtocolType' "GRE"

pattern InterfaceProtocolType_VLAN :: InterfaceProtocolType
pattern $bInterfaceProtocolType_VLAN :: InterfaceProtocolType
$mInterfaceProtocolType_VLAN :: forall {r}.
InterfaceProtocolType -> ((# #) -> r) -> ((# #) -> r) -> r
InterfaceProtocolType_VLAN = InterfaceProtocolType' "VLAN"

{-# COMPLETE
  InterfaceProtocolType_GRE,
  InterfaceProtocolType_VLAN,
  InterfaceProtocolType'
  #-}