{-# 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.ApiDestinationState
-- 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.ApiDestinationState
  ( ApiDestinationState
      ( ..,
        ApiDestinationState_ACTIVE,
        ApiDestinationState_INACTIVE
      ),
  )
where

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

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

pattern ApiDestinationState_ACTIVE :: ApiDestinationState
pattern $bApiDestinationState_ACTIVE :: ApiDestinationState
$mApiDestinationState_ACTIVE :: forall {r}.
ApiDestinationState -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationState_ACTIVE = ApiDestinationState' "ACTIVE"

pattern ApiDestinationState_INACTIVE :: ApiDestinationState
pattern $bApiDestinationState_INACTIVE :: ApiDestinationState
$mApiDestinationState_INACTIVE :: forall {r}.
ApiDestinationState -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationState_INACTIVE = ApiDestinationState' "INACTIVE"

{-# COMPLETE
  ApiDestinationState_ACTIVE,
  ApiDestinationState_INACTIVE,
  ApiDestinationState'
  #-}