{-# 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.GlobalAccelerator.Types.CustomRoutingDestinationTrafficState
-- 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.GlobalAccelerator.Types.CustomRoutingDestinationTrafficState
  ( CustomRoutingDestinationTrafficState
      ( ..,
        CustomRoutingDestinationTrafficState_ALLOW,
        CustomRoutingDestinationTrafficState_DENY
      ),
  )
where

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

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

pattern CustomRoutingDestinationTrafficState_ALLOW :: CustomRoutingDestinationTrafficState
pattern $bCustomRoutingDestinationTrafficState_ALLOW :: CustomRoutingDestinationTrafficState
$mCustomRoutingDestinationTrafficState_ALLOW :: forall {r}.
CustomRoutingDestinationTrafficState
-> ((# #) -> r) -> ((# #) -> r) -> r
CustomRoutingDestinationTrafficState_ALLOW = CustomRoutingDestinationTrafficState' "ALLOW"

pattern CustomRoutingDestinationTrafficState_DENY :: CustomRoutingDestinationTrafficState
pattern $bCustomRoutingDestinationTrafficState_DENY :: CustomRoutingDestinationTrafficState
$mCustomRoutingDestinationTrafficState_DENY :: forall {r}.
CustomRoutingDestinationTrafficState
-> ((# #) -> r) -> ((# #) -> r) -> r
CustomRoutingDestinationTrafficState_DENY = CustomRoutingDestinationTrafficState' "DENY"

{-# COMPLETE
  CustomRoutingDestinationTrafficState_ALLOW,
  CustomRoutingDestinationTrafficState_DENY,
  CustomRoutingDestinationTrafficState'
  #-}