{-# 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.ImageState
-- 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.ImageState
  ( ImageState
      ( ..,
        ImageState_Available,
        ImageState_Deregistered,
        ImageState_Error,
        ImageState_Failed,
        ImageState_Invalid,
        ImageState_Pending,
        ImageState_Transient
      ),
  )
where

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

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

pattern ImageState_Available :: ImageState
pattern $bImageState_Available :: ImageState
$mImageState_Available :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Available = ImageState' "available"

pattern ImageState_Deregistered :: ImageState
pattern $bImageState_Deregistered :: ImageState
$mImageState_Deregistered :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Deregistered = ImageState' "deregistered"

pattern ImageState_Error :: ImageState
pattern $bImageState_Error :: ImageState
$mImageState_Error :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Error = ImageState' "error"

pattern ImageState_Failed :: ImageState
pattern $bImageState_Failed :: ImageState
$mImageState_Failed :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Failed = ImageState' "failed"

pattern ImageState_Invalid :: ImageState
pattern $bImageState_Invalid :: ImageState
$mImageState_Invalid :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Invalid = ImageState' "invalid"

pattern ImageState_Pending :: ImageState
pattern $bImageState_Pending :: ImageState
$mImageState_Pending :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Pending = ImageState' "pending"

pattern ImageState_Transient :: ImageState
pattern $bImageState_Transient :: ImageState
$mImageState_Transient :: forall {r}. ImageState -> ((# #) -> r) -> ((# #) -> r) -> r
ImageState_Transient = ImageState' "transient"

{-# COMPLETE
  ImageState_Available,
  ImageState_Deregistered,
  ImageState_Error,
  ImageState_Failed,
  ImageState_Invalid,
  ImageState_Pending,
  ImageState_Transient,
  ImageState'
  #-}