{-# 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.ApiGatewayV2.Types.EndpointType
-- 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.ApiGatewayV2.Types.EndpointType
  ( EndpointType
      ( ..,
        EndpointType_EDGE,
        EndpointType_REGIONAL
      ),
  )
where

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

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

pattern EndpointType_EDGE :: EndpointType
pattern $bEndpointType_EDGE :: EndpointType
$mEndpointType_EDGE :: forall r. EndpointType -> (Void# -> r) -> (Void# -> r) -> r
EndpointType_EDGE = EndpointType' "EDGE"

pattern EndpointType_REGIONAL :: EndpointType
pattern $bEndpointType_REGIONAL :: EndpointType
$mEndpointType_REGIONAL :: forall r. EndpointType -> (Void# -> r) -> (Void# -> r) -> r
EndpointType_REGIONAL = EndpointType' "REGIONAL"

{-# COMPLETE
  EndpointType_EDGE,
  EndpointType_REGIONAL,
  EndpointType'
  #-}