{-# 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.Personalize.Types.IngestionMode
-- 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.Personalize.Types.IngestionMode
  ( IngestionMode
      ( ..,
        IngestionMode_ALL,
        IngestionMode_BULK,
        IngestionMode_PUT
      ),
  )
where

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

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

pattern IngestionMode_ALL :: IngestionMode
pattern $bIngestionMode_ALL :: IngestionMode
$mIngestionMode_ALL :: forall r. IngestionMode -> (Void# -> r) -> (Void# -> r) -> r
IngestionMode_ALL = IngestionMode' "ALL"

pattern IngestionMode_BULK :: IngestionMode
pattern $bIngestionMode_BULK :: IngestionMode
$mIngestionMode_BULK :: forall r. IngestionMode -> (Void# -> r) -> (Void# -> r) -> r
IngestionMode_BULK = IngestionMode' "BULK"

pattern IngestionMode_PUT :: IngestionMode
pattern $bIngestionMode_PUT :: IngestionMode
$mIngestionMode_PUT :: forall r. IngestionMode -> (Void# -> r) -> (Void# -> r) -> r
IngestionMode_PUT = IngestionMode' "PUT"

{-# COMPLETE
  IngestionMode_ALL,
  IngestionMode_BULK,
  IngestionMode_PUT,
  IngestionMode'
  #-}