{-# 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.EMR.Types.InstanceRoleType
-- 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.EMR.Types.InstanceRoleType
  ( InstanceRoleType
      ( ..,
        InstanceRoleType_CORE,
        InstanceRoleType_MASTER,
        InstanceRoleType_TASK
      ),
  )
where

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

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

pattern InstanceRoleType_CORE :: InstanceRoleType
pattern $bInstanceRoleType_CORE :: InstanceRoleType
$mInstanceRoleType_CORE :: forall r. InstanceRoleType -> (Void# -> r) -> (Void# -> r) -> r
InstanceRoleType_CORE = InstanceRoleType' "CORE"

pattern InstanceRoleType_MASTER :: InstanceRoleType
pattern $bInstanceRoleType_MASTER :: InstanceRoleType
$mInstanceRoleType_MASTER :: forall r. InstanceRoleType -> (Void# -> r) -> (Void# -> r) -> r
InstanceRoleType_MASTER = InstanceRoleType' "MASTER"

pattern InstanceRoleType_TASK :: InstanceRoleType
pattern $bInstanceRoleType_TASK :: InstanceRoleType
$mInstanceRoleType_TASK :: forall r. InstanceRoleType -> (Void# -> r) -> (Void# -> r) -> r
InstanceRoleType_TASK = InstanceRoleType' "TASK"

{-# COMPLETE
  InstanceRoleType_CORE,
  InstanceRoleType_MASTER,
  InstanceRoleType_TASK,
  InstanceRoleType'
  #-}