{-# 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.SageMaker.Types.TrainingJobEarlyStoppingType
-- 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.SageMaker.Types.TrainingJobEarlyStoppingType
  ( TrainingJobEarlyStoppingType
      ( ..,
        TrainingJobEarlyStoppingType_Auto,
        TrainingJobEarlyStoppingType_Off
      ),
  )
where

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

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

pattern TrainingJobEarlyStoppingType_Auto :: TrainingJobEarlyStoppingType
pattern $bTrainingJobEarlyStoppingType_Auto :: TrainingJobEarlyStoppingType
$mTrainingJobEarlyStoppingType_Auto :: forall r.
TrainingJobEarlyStoppingType -> (Void# -> r) -> (Void# -> r) -> r
TrainingJobEarlyStoppingType_Auto = TrainingJobEarlyStoppingType' "Auto"

pattern TrainingJobEarlyStoppingType_Off :: TrainingJobEarlyStoppingType
pattern $bTrainingJobEarlyStoppingType_Off :: TrainingJobEarlyStoppingType
$mTrainingJobEarlyStoppingType_Off :: forall r.
TrainingJobEarlyStoppingType -> (Void# -> r) -> (Void# -> r) -> r
TrainingJobEarlyStoppingType_Off = TrainingJobEarlyStoppingType' "Off"

{-# COMPLETE
  TrainingJobEarlyStoppingType_Auto,
  TrainingJobEarlyStoppingType_Off,
  TrainingJobEarlyStoppingType'
  #-}