{-# 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.SnapshotState
-- 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.SnapshotState
  ( SnapshotState
      ( ..,
        SnapshotState_Completed,
        SnapshotState_Error,
        SnapshotState_Pending,
        SnapshotState_Recoverable,
        SnapshotState_Recovering
      ),
  )
where

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

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

pattern SnapshotState_Completed :: SnapshotState
pattern $bSnapshotState_Completed :: SnapshotState
$mSnapshotState_Completed :: forall {r}. SnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
SnapshotState_Completed = SnapshotState' "completed"

pattern SnapshotState_Error :: SnapshotState
pattern $bSnapshotState_Error :: SnapshotState
$mSnapshotState_Error :: forall {r}. SnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
SnapshotState_Error = SnapshotState' "error"

pattern SnapshotState_Pending :: SnapshotState
pattern $bSnapshotState_Pending :: SnapshotState
$mSnapshotState_Pending :: forall {r}. SnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
SnapshotState_Pending = SnapshotState' "pending"

pattern SnapshotState_Recoverable :: SnapshotState
pattern $bSnapshotState_Recoverable :: SnapshotState
$mSnapshotState_Recoverable :: forall {r}. SnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
SnapshotState_Recoverable = SnapshotState' "recoverable"

pattern SnapshotState_Recovering :: SnapshotState
pattern $bSnapshotState_Recovering :: SnapshotState
$mSnapshotState_Recovering :: forall {r}. SnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
SnapshotState_Recovering = SnapshotState' "recovering"

{-# COMPLETE
  SnapshotState_Completed,
  SnapshotState_Error,
  SnapshotState_Pending,
  SnapshotState_Recoverable,
  SnapshotState_Recovering,
  SnapshotState'
  #-}