{-# 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.WorkDocs.Types.ResourceSortType
-- 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.WorkDocs.Types.ResourceSortType
  ( ResourceSortType
      ( ..,
        ResourceSortType_DATE,
        ResourceSortType_NAME
      ),
  )
where

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

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

pattern ResourceSortType_DATE :: ResourceSortType
pattern $bResourceSortType_DATE :: ResourceSortType
$mResourceSortType_DATE :: forall r. ResourceSortType -> (Void# -> r) -> (Void# -> r) -> r
ResourceSortType_DATE = ResourceSortType' "DATE"

pattern ResourceSortType_NAME :: ResourceSortType
pattern $bResourceSortType_NAME :: ResourceSortType
$mResourceSortType_NAME :: forall r. ResourceSortType -> (Void# -> r) -> (Void# -> r) -> r
ResourceSortType_NAME = ResourceSortType' "NAME"

{-# COMPLETE
  ResourceSortType_DATE,
  ResourceSortType_NAME,
  ResourceSortType'
  #-}