{-# 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.BatchStrategy
-- 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.BatchStrategy
  ( BatchStrategy
      ( ..,
        BatchStrategy_MultiRecord,
        BatchStrategy_SingleRecord
      ),
  )
where

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

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

pattern BatchStrategy_MultiRecord :: BatchStrategy
pattern $bBatchStrategy_MultiRecord :: BatchStrategy
$mBatchStrategy_MultiRecord :: forall r. BatchStrategy -> (Void# -> r) -> (Void# -> r) -> r
BatchStrategy_MultiRecord = BatchStrategy' "MultiRecord"

pattern BatchStrategy_SingleRecord :: BatchStrategy
pattern $bBatchStrategy_SingleRecord :: BatchStrategy
$mBatchStrategy_SingleRecord :: forall r. BatchStrategy -> (Void# -> r) -> (Void# -> r) -> r
BatchStrategy_SingleRecord = BatchStrategy' "SingleRecord"

{-# COMPLETE
  BatchStrategy_MultiRecord,
  BatchStrategy_SingleRecord,
  BatchStrategy'
  #-}