{-# 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.Route53Resolver.Types.Action
-- 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.Route53Resolver.Types.Action
  ( Action
      ( ..,
        Action_ALERT,
        Action_ALLOW,
        Action_BLOCK
      ),
  )
where

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

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

pattern Action_ALERT :: Action
pattern $bAction_ALERT :: Action
$mAction_ALERT :: forall r. Action -> (Void# -> r) -> (Void# -> r) -> r
Action_ALERT = Action' "ALERT"

pattern Action_ALLOW :: Action
pattern $bAction_ALLOW :: Action
$mAction_ALLOW :: forall r. Action -> (Void# -> r) -> (Void# -> r) -> r
Action_ALLOW = Action' "ALLOW"

pattern Action_BLOCK :: Action
pattern $bAction_BLOCK :: Action
$mAction_BLOCK :: forall r. Action -> (Void# -> r) -> (Void# -> r) -> r
Action_BLOCK = Action' "BLOCK"

{-# COMPLETE
  Action_ALERT,
  Action_ALLOW,
  Action_BLOCK,
  Action'
  #-}