{-# 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.ServiceConnectivityType
-- 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.ServiceConnectivityType
  ( ServiceConnectivityType
      ( ..,
        ServiceConnectivityType_Ipv4,
        ServiceConnectivityType_Ipv6
      ),
  )
where

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

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

pattern ServiceConnectivityType_Ipv4 :: ServiceConnectivityType
pattern $bServiceConnectivityType_Ipv4 :: ServiceConnectivityType
$mServiceConnectivityType_Ipv4 :: forall {r}.
ServiceConnectivityType -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceConnectivityType_Ipv4 = ServiceConnectivityType' "ipv4"

pattern ServiceConnectivityType_Ipv6 :: ServiceConnectivityType
pattern $bServiceConnectivityType_Ipv6 :: ServiceConnectivityType
$mServiceConnectivityType_Ipv6 :: forall {r}.
ServiceConnectivityType -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceConnectivityType_Ipv6 = ServiceConnectivityType' "ipv6"

{-# COMPLETE
  ServiceConnectivityType_Ipv4,
  ServiceConnectivityType_Ipv6,
  ServiceConnectivityType'
  #-}