{-# 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.CloudWatchEvents.Types.ArchiveState
-- 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.CloudWatchEvents.Types.ArchiveState
  ( ArchiveState
      ( ..,
        ArchiveState_CREATE_FAILED,
        ArchiveState_CREATING,
        ArchiveState_DISABLED,
        ArchiveState_ENABLED,
        ArchiveState_UPDATE_FAILED,
        ArchiveState_UPDATING
      ),
  )
where

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

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

pattern ArchiveState_CREATE_FAILED :: ArchiveState
pattern $bArchiveState_CREATE_FAILED :: ArchiveState
$mArchiveState_CREATE_FAILED :: forall r. ArchiveState -> (Void# -> r) -> (Void# -> r) -> r
ArchiveState_CREATE_FAILED = ArchiveState' "CREATE_FAILED"

pattern ArchiveState_CREATING :: ArchiveState
pattern $bArchiveState_CREATING :: ArchiveState
$mArchiveState_CREATING :: forall r. ArchiveState -> (Void# -> r) -> (Void# -> r) -> r
ArchiveState_CREATING = ArchiveState' "CREATING"

pattern ArchiveState_DISABLED :: ArchiveState
pattern $bArchiveState_DISABLED :: ArchiveState
$mArchiveState_DISABLED :: forall r. ArchiveState -> (Void# -> r) -> (Void# -> r) -> r
ArchiveState_DISABLED = ArchiveState' "DISABLED"

pattern ArchiveState_ENABLED :: ArchiveState
pattern $bArchiveState_ENABLED :: ArchiveState
$mArchiveState_ENABLED :: forall r. ArchiveState -> (Void# -> r) -> (Void# -> r) -> r
ArchiveState_ENABLED = ArchiveState' "ENABLED"

pattern ArchiveState_UPDATE_FAILED :: ArchiveState
pattern $bArchiveState_UPDATE_FAILED :: ArchiveState
$mArchiveState_UPDATE_FAILED :: forall r. ArchiveState -> (Void# -> r) -> (Void# -> r) -> r
ArchiveState_UPDATE_FAILED = ArchiveState' "UPDATE_FAILED"

pattern ArchiveState_UPDATING :: ArchiveState
pattern $bArchiveState_UPDATING :: ArchiveState
$mArchiveState_UPDATING :: forall r. ArchiveState -> (Void# -> r) -> (Void# -> r) -> r
ArchiveState_UPDATING = ArchiveState' "UPDATING"

{-# COMPLETE
  ArchiveState_CREATE_FAILED,
  ArchiveState_CREATING,
  ArchiveState_DISABLED,
  ArchiveState_ENABLED,
  ArchiveState_UPDATE_FAILED,
  ArchiveState_UPDATING,
  ArchiveState'
  #-}