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

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

newtype ApiDestinationState = ApiDestinationState'
  { ApiDestinationState -> Text
fromApiDestinationState ::
      Core.Text
  }
  deriving stock
    ( Int -> ApiDestinationState -> ShowS
[ApiDestinationState] -> ShowS
ApiDestinationState -> String
(Int -> ApiDestinationState -> ShowS)
-> (ApiDestinationState -> String)
-> ([ApiDestinationState] -> ShowS)
-> Show ApiDestinationState
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]
(Int -> ReadS ApiDestinationState)
-> ReadS [ApiDestinationState]
-> ReadPrec ApiDestinationState
-> ReadPrec [ApiDestinationState]
-> Read 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
(ApiDestinationState -> ApiDestinationState -> Bool)
-> (ApiDestinationState -> ApiDestinationState -> Bool)
-> Eq ApiDestinationState
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
Eq ApiDestinationState
-> (ApiDestinationState -> ApiDestinationState -> Ordering)
-> (ApiDestinationState -> ApiDestinationState -> Bool)
-> (ApiDestinationState -> ApiDestinationState -> Bool)
-> (ApiDestinationState -> ApiDestinationState -> Bool)
-> (ApiDestinationState -> ApiDestinationState -> Bool)
-> (ApiDestinationState
    -> ApiDestinationState -> ApiDestinationState)
-> (ApiDestinationState
    -> ApiDestinationState -> ApiDestinationState)
-> Ord 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
$cp1Ord :: Eq ApiDestinationState
Prelude.Ord,
      (forall x. ApiDestinationState -> Rep ApiDestinationState x)
-> (forall x. Rep ApiDestinationState x -> ApiDestinationState)
-> Generic ApiDestinationState
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
    ( Int -> ApiDestinationState -> Int
ApiDestinationState -> Int
(Int -> ApiDestinationState -> Int)
-> (ApiDestinationState -> Int) -> Hashable ApiDestinationState
forall 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 -> ()
(ApiDestinationState -> ()) -> NFData ApiDestinationState
forall a. (a -> ()) -> NFData a
rnf :: ApiDestinationState -> ()
$crnf :: ApiDestinationState -> ()
Prelude.NFData,
      Text -> Either String ApiDestinationState
(Text -> Either String ApiDestinationState)
-> FromText ApiDestinationState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ApiDestinationState
$cfromText :: Text -> Either String ApiDestinationState
Core.FromText,
      ApiDestinationState -> Text
(ApiDestinationState -> Text) -> ToText ApiDestinationState
forall a. (a -> Text) -> ToText a
toText :: ApiDestinationState -> Text
$ctoText :: ApiDestinationState -> Text
Core.ToText,
      ApiDestinationState -> ByteString
(ApiDestinationState -> ByteString)
-> ToByteString ApiDestinationState
forall a. (a -> ByteString) -> ToByteString a
toBS :: ApiDestinationState -> ByteString
$ctoBS :: ApiDestinationState -> ByteString
Core.ToByteString,
      ApiDestinationState -> ByteStringBuilder
(ApiDestinationState -> ByteStringBuilder)
-> ToLog ApiDestinationState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ApiDestinationState -> ByteStringBuilder
$cbuild :: ApiDestinationState -> ByteStringBuilder
Core.ToLog,
      HeaderName -> ApiDestinationState -> [Header]
(HeaderName -> ApiDestinationState -> [Header])
-> ToHeader ApiDestinationState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ApiDestinationState -> [Header]
$ctoHeader :: HeaderName -> ApiDestinationState -> [Header]
Core.ToHeader,
      ApiDestinationState -> QueryString
(ApiDestinationState -> QueryString) -> ToQuery ApiDestinationState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ApiDestinationState -> QueryString
$ctoQuery :: ApiDestinationState -> QueryString
Core.ToQuery,
      Value -> Parser [ApiDestinationState]
Value -> Parser ApiDestinationState
(Value -> Parser ApiDestinationState)
-> (Value -> Parser [ApiDestinationState])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [ApiDestinationState]
FromJSONKeyFunction ApiDestinationState
FromJSONKeyFunction ApiDestinationState
-> FromJSONKeyFunction [ApiDestinationState]
-> FromJSONKey ApiDestinationState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ApiDestinationState]
$cfromJSONKeyList :: FromJSONKeyFunction [ApiDestinationState]
fromJSONKey :: FromJSONKeyFunction ApiDestinationState
$cfromJSONKey :: FromJSONKeyFunction ApiDestinationState
Core.FromJSONKey,
      [ApiDestinationState] -> Encoding
[ApiDestinationState] -> Value
ApiDestinationState -> Encoding
ApiDestinationState -> Value
(ApiDestinationState -> Value)
-> (ApiDestinationState -> Encoding)
-> ([ApiDestinationState] -> Value)
-> ([ApiDestinationState] -> Encoding)
-> ToJSON ApiDestinationState
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
Core.ToJSON,
      ToJSONKeyFunction [ApiDestinationState]
ToJSONKeyFunction ApiDestinationState
ToJSONKeyFunction ApiDestinationState
-> ToJSONKeyFunction [ApiDestinationState]
-> ToJSONKey ApiDestinationState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ApiDestinationState]
$ctoJSONKeyList :: ToJSONKeyFunction [ApiDestinationState]
toJSONKey :: ToJSONKeyFunction ApiDestinationState
$ctoJSONKey :: ToJSONKeyFunction ApiDestinationState
Core.ToJSONKey,
      [Node] -> Either String ApiDestinationState
([Node] -> Either String ApiDestinationState)
-> FromXML ApiDestinationState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ApiDestinationState
$cparseXML :: [Node] -> Either String ApiDestinationState
Core.FromXML,
      ApiDestinationState -> XML
(ApiDestinationState -> XML) -> ToXML ApiDestinationState
forall a. (a -> XML) -> ToXML a
toXML :: ApiDestinationState -> XML
$ctoXML :: ApiDestinationState -> XML
Core.ToXML
    )

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

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

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