{-# 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.EC2.Types.ListingState
-- 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.EC2.Types.ListingState
  ( ListingState
      ( ..,
        ListingState_Available,
        ListingState_Cancelled,
        ListingState_Pending,
        ListingState_Sold
      ),
  )
where

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

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

pattern ListingState_Available :: ListingState
pattern $bListingState_Available :: ListingState
$mListingState_Available :: forall {r}. ListingState -> ((# #) -> r) -> ((# #) -> r) -> r
ListingState_Available = ListingState' "available"

pattern ListingState_Cancelled :: ListingState
pattern $bListingState_Cancelled :: ListingState
$mListingState_Cancelled :: forall {r}. ListingState -> ((# #) -> r) -> ((# #) -> r) -> r
ListingState_Cancelled = ListingState' "cancelled"

pattern ListingState_Pending :: ListingState
pattern $bListingState_Pending :: ListingState
$mListingState_Pending :: forall {r}. ListingState -> ((# #) -> r) -> ((# #) -> r) -> r
ListingState_Pending = ListingState' "pending"

pattern ListingState_Sold :: ListingState
pattern $bListingState_Sold :: ListingState
$mListingState_Sold :: forall {r}. ListingState -> ((# #) -> r) -> ((# #) -> r) -> r
ListingState_Sold = ListingState' "sold"

{-# COMPLETE
  ListingState_Available,
  ListingState_Cancelled,
  ListingState_Pending,
  ListingState_Sold,
  ListingState'
  #-}