{-# 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.ServiceCatalog.Types.ProductViewSortBy
-- 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.ServiceCatalog.Types.ProductViewSortBy
  ( ProductViewSortBy
      ( ..,
        ProductViewSortBy_CreationDate,
        ProductViewSortBy_Title,
        ProductViewSortBy_VersionCount
      ),
  )
where

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

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

pattern ProductViewSortBy_CreationDate :: ProductViewSortBy
pattern $bProductViewSortBy_CreationDate :: ProductViewSortBy
$mProductViewSortBy_CreationDate :: forall r. ProductViewSortBy -> (Void# -> r) -> (Void# -> r) -> r
ProductViewSortBy_CreationDate = ProductViewSortBy' "CreationDate"

pattern ProductViewSortBy_Title :: ProductViewSortBy
pattern $bProductViewSortBy_Title :: ProductViewSortBy
$mProductViewSortBy_Title :: forall r. ProductViewSortBy -> (Void# -> r) -> (Void# -> r) -> r
ProductViewSortBy_Title = ProductViewSortBy' "Title"

pattern ProductViewSortBy_VersionCount :: ProductViewSortBy
pattern $bProductViewSortBy_VersionCount :: ProductViewSortBy
$mProductViewSortBy_VersionCount :: forall r. ProductViewSortBy -> (Void# -> r) -> (Void# -> r) -> r
ProductViewSortBy_VersionCount = ProductViewSortBy' "VersionCount"

{-# COMPLETE
  ProductViewSortBy_CreationDate,
  ProductViewSortBy_Title,
  ProductViewSortBy_VersionCount,
  ProductViewSortBy'
  #-}