{-# 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.Shield.Types.SubscriptionState
-- 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.Shield.Types.SubscriptionState
  ( SubscriptionState
      ( ..,
        SubscriptionState_ACTIVE,
        SubscriptionState_INACTIVE
      ),
  )
where

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

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

pattern SubscriptionState_ACTIVE :: SubscriptionState
pattern $bSubscriptionState_ACTIVE :: SubscriptionState
$mSubscriptionState_ACTIVE :: forall r. SubscriptionState -> (Void# -> r) -> (Void# -> r) -> r
SubscriptionState_ACTIVE = SubscriptionState' "ACTIVE"

pattern SubscriptionState_INACTIVE :: SubscriptionState
pattern $bSubscriptionState_INACTIVE :: SubscriptionState
$mSubscriptionState_INACTIVE :: forall r. SubscriptionState -> (Void# -> r) -> (Void# -> r) -> r
SubscriptionState_INACTIVE = SubscriptionState' "INACTIVE"

{-# COMPLETE
  SubscriptionState_ACTIVE,
  SubscriptionState_INACTIVE,
  SubscriptionState'
  #-}