{-# 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.SortContextsBy
-- 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.SortContextsBy
  ( SortContextsBy
      ( ..,
        SortContextsBy_CreationTime,
        SortContextsBy_Name
      ),
  )
where

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

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

pattern SortContextsBy_CreationTime :: SortContextsBy
pattern $bSortContextsBy_CreationTime :: SortContextsBy
$mSortContextsBy_CreationTime :: forall r. SortContextsBy -> (Void# -> r) -> (Void# -> r) -> r
SortContextsBy_CreationTime = SortContextsBy' "CreationTime"

pattern SortContextsBy_Name :: SortContextsBy
pattern $bSortContextsBy_Name :: SortContextsBy
$mSortContextsBy_Name :: forall r. SortContextsBy -> (Void# -> r) -> (Void# -> r) -> r
SortContextsBy_Name = SortContextsBy' "Name"

{-# COMPLETE
  SortContextsBy_CreationTime,
  SortContextsBy_Name,
  SortContextsBy'
  #-}