{-# 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.CodeArtifact.Types.PackageVersionSortType
-- 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.CodeArtifact.Types.PackageVersionSortType
  ( PackageVersionSortType
      ( ..,
        PackageVersionSortType_PUBLISHED_TIME
      ),
  )
where

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

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

pattern PackageVersionSortType_PUBLISHED_TIME :: PackageVersionSortType
pattern $bPackageVersionSortType_PUBLISHED_TIME :: PackageVersionSortType
$mPackageVersionSortType_PUBLISHED_TIME :: forall r.
PackageVersionSortType -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionSortType_PUBLISHED_TIME = PackageVersionSortType' "PUBLISHED_TIME"

{-# COMPLETE
  PackageVersionSortType_PUBLISHED_TIME,
  PackageVersionSortType'
  #-}