{-# 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.Lightsail.Types.DiskSnapshotState
-- 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.Lightsail.Types.DiskSnapshotState
  ( DiskSnapshotState
      ( ..,
        DiskSnapshotState_Completed,
        DiskSnapshotState_Error,
        DiskSnapshotState_Pending,
        DiskSnapshotState_Unknown
      ),
  )
where

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

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

pattern DiskSnapshotState_Completed :: DiskSnapshotState
pattern $bDiskSnapshotState_Completed :: DiskSnapshotState
$mDiskSnapshotState_Completed :: forall {r}. DiskSnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
DiskSnapshotState_Completed = DiskSnapshotState' "completed"

pattern DiskSnapshotState_Error :: DiskSnapshotState
pattern $bDiskSnapshotState_Error :: DiskSnapshotState
$mDiskSnapshotState_Error :: forall {r}. DiskSnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
DiskSnapshotState_Error = DiskSnapshotState' "error"

pattern DiskSnapshotState_Pending :: DiskSnapshotState
pattern $bDiskSnapshotState_Pending :: DiskSnapshotState
$mDiskSnapshotState_Pending :: forall {r}. DiskSnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
DiskSnapshotState_Pending = DiskSnapshotState' "pending"

pattern DiskSnapshotState_Unknown :: DiskSnapshotState
pattern $bDiskSnapshotState_Unknown :: DiskSnapshotState
$mDiskSnapshotState_Unknown :: forall {r}. DiskSnapshotState -> ((# #) -> r) -> ((# #) -> r) -> r
DiskSnapshotState_Unknown = DiskSnapshotState' "unknown"

{-# COMPLETE
  DiskSnapshotState_Completed,
  DiskSnapshotState_Error,
  DiskSnapshotState_Pending,
  DiskSnapshotState_Unknown,
  DiskSnapshotState'
  #-}