{-# 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.EventSourceState
-- 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.CloudWatchEvents.Types.EventSourceState
  ( EventSourceState
      ( ..,
        EventSourceState_ACTIVE,
        EventSourceState_DELETED,
        EventSourceState_PENDING
      ),
  )
where

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

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

pattern EventSourceState_ACTIVE :: EventSourceState
pattern $bEventSourceState_ACTIVE :: EventSourceState
$mEventSourceState_ACTIVE :: forall {r}. EventSourceState -> ((# #) -> r) -> ((# #) -> r) -> r
EventSourceState_ACTIVE = EventSourceState' "ACTIVE"

pattern EventSourceState_DELETED :: EventSourceState
pattern $bEventSourceState_DELETED :: EventSourceState
$mEventSourceState_DELETED :: forall {r}. EventSourceState -> ((# #) -> r) -> ((# #) -> r) -> r
EventSourceState_DELETED = EventSourceState' "DELETED"

pattern EventSourceState_PENDING :: EventSourceState
pattern $bEventSourceState_PENDING :: EventSourceState
$mEventSourceState_PENDING :: forall {r}. EventSourceState -> ((# #) -> r) -> ((# #) -> r) -> r
EventSourceState_PENDING = EventSourceState' "PENDING"

{-# COMPLETE
  EventSourceState_ACTIVE,
  EventSourceState_DELETED,
  EventSourceState_PENDING,
  EventSourceState'
  #-}