{-# 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.MediaLive.Types.ReservationState
-- 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.MediaLive.Types.ReservationState
  ( ReservationState
      ( ..,
        ReservationState_ACTIVE,
        ReservationState_CANCELED,
        ReservationState_DELETED,
        ReservationState_EXPIRED
      ),
  )
where

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

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

pattern ReservationState_ACTIVE :: ReservationState
pattern $bReservationState_ACTIVE :: ReservationState
$mReservationState_ACTIVE :: forall r. ReservationState -> (Void# -> r) -> (Void# -> r) -> r
ReservationState_ACTIVE = ReservationState' "ACTIVE"

pattern ReservationState_CANCELED :: ReservationState
pattern $bReservationState_CANCELED :: ReservationState
$mReservationState_CANCELED :: forall r. ReservationState -> (Void# -> r) -> (Void# -> r) -> r
ReservationState_CANCELED = ReservationState' "CANCELED"

pattern ReservationState_DELETED :: ReservationState
pattern $bReservationState_DELETED :: ReservationState
$mReservationState_DELETED :: forall r. ReservationState -> (Void# -> r) -> (Void# -> r) -> r
ReservationState_DELETED = ReservationState' "DELETED"

pattern ReservationState_EXPIRED :: ReservationState
pattern $bReservationState_EXPIRED :: ReservationState
$mReservationState_EXPIRED :: forall r. ReservationState -> (Void# -> r) -> (Void# -> r) -> r
ReservationState_EXPIRED = ReservationState' "EXPIRED"

{-# COMPLETE
  ReservationState_ACTIVE,
  ReservationState_CANCELED,
  ReservationState_DELETED,
  ReservationState_EXPIRED,
  ReservationState'
  #-}