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

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

newtype DestinationType = DestinationType'
  { DestinationType -> Text
fromDestinationType ::
      Core.Text
  }
  deriving stock
    ( Int -> DestinationType -> ShowS
[DestinationType] -> ShowS
DestinationType -> String
(Int -> DestinationType -> ShowS)
-> (DestinationType -> String)
-> ([DestinationType] -> ShowS)
-> Show DestinationType
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]
(Int -> ReadS DestinationType)
-> ReadS [DestinationType]
-> ReadPrec DestinationType
-> ReadPrec [DestinationType]
-> Read 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
(DestinationType -> DestinationType -> Bool)
-> (DestinationType -> DestinationType -> Bool)
-> Eq DestinationType
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
Eq DestinationType
-> (DestinationType -> DestinationType -> Ordering)
-> (DestinationType -> DestinationType -> Bool)
-> (DestinationType -> DestinationType -> Bool)
-> (DestinationType -> DestinationType -> Bool)
-> (DestinationType -> DestinationType -> Bool)
-> (DestinationType -> DestinationType -> DestinationType)
-> (DestinationType -> DestinationType -> DestinationType)
-> Ord 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
$cp1Ord :: Eq DestinationType
Prelude.Ord,
      (forall x. DestinationType -> Rep DestinationType x)
-> (forall x. Rep DestinationType x -> DestinationType)
-> Generic DestinationType
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
    ( Int -> DestinationType -> Int
DestinationType -> Int
(Int -> DestinationType -> Int)
-> (DestinationType -> Int) -> Hashable DestinationType
forall 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 -> ()
(DestinationType -> ()) -> NFData DestinationType
forall a. (a -> ()) -> NFData a
rnf :: DestinationType -> ()
$crnf :: DestinationType -> ()
Prelude.NFData,
      Text -> Either String DestinationType
(Text -> Either String DestinationType) -> FromText DestinationType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String DestinationType
$cfromText :: Text -> Either String DestinationType
Core.FromText,
      DestinationType -> Text
(DestinationType -> Text) -> ToText DestinationType
forall a. (a -> Text) -> ToText a
toText :: DestinationType -> Text
$ctoText :: DestinationType -> Text
Core.ToText,
      DestinationType -> ByteString
(DestinationType -> ByteString) -> ToByteString DestinationType
forall a. (a -> ByteString) -> ToByteString a
toBS :: DestinationType -> ByteString
$ctoBS :: DestinationType -> ByteString
Core.ToByteString,
      DestinationType -> ByteStringBuilder
(DestinationType -> ByteStringBuilder) -> ToLog DestinationType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: DestinationType -> ByteStringBuilder
$cbuild :: DestinationType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> DestinationType -> [Header]
(HeaderName -> DestinationType -> [Header])
-> ToHeader DestinationType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> DestinationType -> [Header]
$ctoHeader :: HeaderName -> DestinationType -> [Header]
Core.ToHeader,
      DestinationType -> QueryString
(DestinationType -> QueryString) -> ToQuery DestinationType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: DestinationType -> QueryString
$ctoQuery :: DestinationType -> QueryString
Core.ToQuery,
      Value -> Parser [DestinationType]
Value -> Parser DestinationType
(Value -> Parser DestinationType)
-> (Value -> Parser [DestinationType]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [DestinationType]
FromJSONKeyFunction DestinationType
FromJSONKeyFunction DestinationType
-> FromJSONKeyFunction [DestinationType]
-> FromJSONKey DestinationType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [DestinationType]
$cfromJSONKeyList :: FromJSONKeyFunction [DestinationType]
fromJSONKey :: FromJSONKeyFunction DestinationType
$cfromJSONKey :: FromJSONKeyFunction DestinationType
Core.FromJSONKey,
      [DestinationType] -> Encoding
[DestinationType] -> Value
DestinationType -> Encoding
DestinationType -> Value
(DestinationType -> Value)
-> (DestinationType -> Encoding)
-> ([DestinationType] -> Value)
-> ([DestinationType] -> Encoding)
-> ToJSON DestinationType
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
Core.ToJSON,
      ToJSONKeyFunction [DestinationType]
ToJSONKeyFunction DestinationType
ToJSONKeyFunction DestinationType
-> ToJSONKeyFunction [DestinationType] -> ToJSONKey DestinationType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [DestinationType]
$ctoJSONKeyList :: ToJSONKeyFunction [DestinationType]
toJSONKey :: ToJSONKeyFunction DestinationType
$ctoJSONKey :: ToJSONKeyFunction DestinationType
Core.ToJSONKey,
      [Node] -> Either String DestinationType
([Node] -> Either String DestinationType)
-> FromXML DestinationType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String DestinationType
$cparseXML :: [Node] -> Either String DestinationType
Core.FromXML,
      DestinationType -> XML
(DestinationType -> XML) -> ToXML DestinationType
forall a. (a -> XML) -> ToXML a
toXML :: DestinationType -> XML
$ctoXML :: DestinationType -> XML
Core.ToXML
    )

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

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

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

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