{-# 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.EMRContainers.Types.EndpointState
-- 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.EMRContainers.Types.EndpointState
  ( EndpointState
      ( ..,
        EndpointState_ACTIVE,
        EndpointState_CREATING,
        EndpointState_TERMINATED,
        EndpointState_TERMINATED_WITH_ERRORS,
        EndpointState_TERMINATING
      ),
  )
where

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

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

pattern EndpointState_ACTIVE :: EndpointState
pattern $bEndpointState_ACTIVE :: EndpointState
$mEndpointState_ACTIVE :: forall r. EndpointState -> (Void# -> r) -> (Void# -> r) -> r
EndpointState_ACTIVE = EndpointState' "ACTIVE"

pattern EndpointState_CREATING :: EndpointState
pattern $bEndpointState_CREATING :: EndpointState
$mEndpointState_CREATING :: forall r. EndpointState -> (Void# -> r) -> (Void# -> r) -> r
EndpointState_CREATING = EndpointState' "CREATING"

pattern EndpointState_TERMINATED :: EndpointState
pattern $bEndpointState_TERMINATED :: EndpointState
$mEndpointState_TERMINATED :: forall r. EndpointState -> (Void# -> r) -> (Void# -> r) -> r
EndpointState_TERMINATED = EndpointState' "TERMINATED"

pattern EndpointState_TERMINATED_WITH_ERRORS :: EndpointState
pattern $bEndpointState_TERMINATED_WITH_ERRORS :: EndpointState
$mEndpointState_TERMINATED_WITH_ERRORS :: forall r. EndpointState -> (Void# -> r) -> (Void# -> r) -> r
EndpointState_TERMINATED_WITH_ERRORS = EndpointState' "TERMINATED_WITH_ERRORS"

pattern EndpointState_TERMINATING :: EndpointState
pattern $bEndpointState_TERMINATING :: EndpointState
$mEndpointState_TERMINATING :: forall r. EndpointState -> (Void# -> r) -> (Void# -> r) -> r
EndpointState_TERMINATING = EndpointState' "TERMINATING"

{-# COMPLETE
  EndpointState_ACTIVE,
  EndpointState_CREATING,
  EndpointState_TERMINATED,
  EndpointState_TERMINATED_WITH_ERRORS,
  EndpointState_TERMINATING,
  EndpointState'
  #-}