{-# 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.LexV2Models.Types.MessageSelectionStrategy
-- 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.LexV2Models.Types.MessageSelectionStrategy
  ( MessageSelectionStrategy
      ( ..,
        MessageSelectionStrategy_Ordered,
        MessageSelectionStrategy_Random
      ),
  )
where

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

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

pattern MessageSelectionStrategy_Ordered :: MessageSelectionStrategy
pattern $bMessageSelectionStrategy_Ordered :: MessageSelectionStrategy
$mMessageSelectionStrategy_Ordered :: forall {r}.
MessageSelectionStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
MessageSelectionStrategy_Ordered = MessageSelectionStrategy' "Ordered"

pattern MessageSelectionStrategy_Random :: MessageSelectionStrategy
pattern $bMessageSelectionStrategy_Random :: MessageSelectionStrategy
$mMessageSelectionStrategy_Random :: forall {r}.
MessageSelectionStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
MessageSelectionStrategy_Random = MessageSelectionStrategy' "Random"

{-# COMPLETE
  MessageSelectionStrategy_Ordered,
  MessageSelectionStrategy_Random,
  MessageSelectionStrategy'
  #-}