{-# 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.FleetStateCode
-- 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.FleetStateCode
  ( FleetStateCode
      ( ..,
        FleetStateCode_Active,
        FleetStateCode_Deleted,
        FleetStateCode_Deleted_running,
        FleetStateCode_Deleted_terminating,
        FleetStateCode_Failed,
        FleetStateCode_Modifying,
        FleetStateCode_Submitted
      ),
  )
where

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

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

pattern FleetStateCode_Active :: FleetStateCode
pattern $bFleetStateCode_Active :: FleetStateCode
$mFleetStateCode_Active :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Active = FleetStateCode' "active"

pattern FleetStateCode_Deleted :: FleetStateCode
pattern $bFleetStateCode_Deleted :: FleetStateCode
$mFleetStateCode_Deleted :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Deleted = FleetStateCode' "deleted"

pattern FleetStateCode_Deleted_running :: FleetStateCode
pattern $bFleetStateCode_Deleted_running :: FleetStateCode
$mFleetStateCode_Deleted_running :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Deleted_running = FleetStateCode' "deleted_running"

pattern FleetStateCode_Deleted_terminating :: FleetStateCode
pattern $bFleetStateCode_Deleted_terminating :: FleetStateCode
$mFleetStateCode_Deleted_terminating :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Deleted_terminating = FleetStateCode' "deleted_terminating"

pattern FleetStateCode_Failed :: FleetStateCode
pattern $bFleetStateCode_Failed :: FleetStateCode
$mFleetStateCode_Failed :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Failed = FleetStateCode' "failed"

pattern FleetStateCode_Modifying :: FleetStateCode
pattern $bFleetStateCode_Modifying :: FleetStateCode
$mFleetStateCode_Modifying :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Modifying = FleetStateCode' "modifying"

pattern FleetStateCode_Submitted :: FleetStateCode
pattern $bFleetStateCode_Submitted :: FleetStateCode
$mFleetStateCode_Submitted :: forall {r}. FleetStateCode -> ((# #) -> r) -> ((# #) -> r) -> r
FleetStateCode_Submitted = FleetStateCode' "submitted"

{-# COMPLETE
  FleetStateCode_Active,
  FleetStateCode_Deleted,
  FleetStateCode_Deleted_running,
  FleetStateCode_Deleted_terminating,
  FleetStateCode_Failed,
  FleetStateCode_Modifying,
  FleetStateCode_Submitted,
  FleetStateCode'
  #-}