{-# 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.InstanceGroupType
-- 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.InstanceGroupType
  ( InstanceGroupType
      ( ..,
        InstanceGroupType_CORE,
        InstanceGroupType_MASTER,
        InstanceGroupType_TASK
      ),
  )
where

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

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

pattern InstanceGroupType_CORE :: InstanceGroupType
pattern $bInstanceGroupType_CORE :: InstanceGroupType
$mInstanceGroupType_CORE :: forall r. InstanceGroupType -> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupType_CORE = InstanceGroupType' "CORE"

pattern InstanceGroupType_MASTER :: InstanceGroupType
pattern $bInstanceGroupType_MASTER :: InstanceGroupType
$mInstanceGroupType_MASTER :: forall r. InstanceGroupType -> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupType_MASTER = InstanceGroupType' "MASTER"

pattern InstanceGroupType_TASK :: InstanceGroupType
pattern $bInstanceGroupType_TASK :: InstanceGroupType
$mInstanceGroupType_TASK :: forall r. InstanceGroupType -> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupType_TASK = InstanceGroupType' "TASK"

{-# COMPLETE
  InstanceGroupType_CORE,
  InstanceGroupType_MASTER,
  InstanceGroupType_TASK,
  InstanceGroupType'
  #-}