{-# 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.FMS.Types.DestinationType
-- 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.FMS.Types.DestinationType
  ( DestinationType
      ( ..,
        DestinationType_IPV4,
        DestinationType_IPV6,
        DestinationType_PREFIX_LIST
      ),
  )
where

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

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

pattern DestinationType_IPV4 :: DestinationType
pattern $bDestinationType_IPV4 :: DestinationType
$mDestinationType_IPV4 :: forall {r}. DestinationType -> ((# #) -> r) -> ((# #) -> r) -> r
DestinationType_IPV4 = DestinationType' "IPV4"

pattern DestinationType_IPV6 :: DestinationType
pattern $bDestinationType_IPV6 :: DestinationType
$mDestinationType_IPV6 :: forall {r}. DestinationType -> ((# #) -> r) -> ((# #) -> r) -> r
DestinationType_IPV6 = DestinationType' "IPV6"

pattern DestinationType_PREFIX_LIST :: DestinationType
pattern $bDestinationType_PREFIX_LIST :: DestinationType
$mDestinationType_PREFIX_LIST :: forall {r}. DestinationType -> ((# #) -> r) -> ((# #) -> r) -> r
DestinationType_PREFIX_LIST = DestinationType' "PREFIX_LIST"

{-# COMPLETE
  DestinationType_IPV4,
  DestinationType_IPV6,
  DestinationType_PREFIX_LIST,
  DestinationType'
  #-}