{-# 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.InferenceExecutionMode
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.InferenceExecutionMode
  ( InferenceExecutionMode
      ( ..,
        InferenceExecutionMode_Direct,
        InferenceExecutionMode_Serial
      ),
  )
where

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

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

pattern InferenceExecutionMode_Direct :: InferenceExecutionMode
pattern $bInferenceExecutionMode_Direct :: InferenceExecutionMode
$mInferenceExecutionMode_Direct :: forall {r}.
InferenceExecutionMode -> ((# #) -> r) -> ((# #) -> r) -> r
InferenceExecutionMode_Direct = InferenceExecutionMode' "Direct"

pattern InferenceExecutionMode_Serial :: InferenceExecutionMode
pattern $bInferenceExecutionMode_Serial :: InferenceExecutionMode
$mInferenceExecutionMode_Serial :: forall {r}.
InferenceExecutionMode -> ((# #) -> r) -> ((# #) -> r) -> r
InferenceExecutionMode_Serial = InferenceExecutionMode' "Serial"

{-# COMPLETE
  InferenceExecutionMode_Direct,
  InferenceExecutionMode_Serial,
  InferenceExecutionMode'
  #-}