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

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

newtype DiskSnapshotState = DiskSnapshotState'
  { DiskSnapshotState -> Text
fromDiskSnapshotState ::
      Core.Text
  }
  deriving stock
    ( Int -> DiskSnapshotState -> ShowS
[DiskSnapshotState] -> ShowS
DiskSnapshotState -> String
(Int -> DiskSnapshotState -> ShowS)
-> (DiskSnapshotState -> String)
-> ([DiskSnapshotState] -> ShowS)
-> Show DiskSnapshotState
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]
(Int -> ReadS DiskSnapshotState)
-> ReadS [DiskSnapshotState]
-> ReadPrec DiskSnapshotState
-> ReadPrec [DiskSnapshotState]
-> Read 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
(DiskSnapshotState -> DiskSnapshotState -> Bool)
-> (DiskSnapshotState -> DiskSnapshotState -> Bool)
-> Eq DiskSnapshotState
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
Eq DiskSnapshotState
-> (DiskSnapshotState -> DiskSnapshotState -> Ordering)
-> (DiskSnapshotState -> DiskSnapshotState -> Bool)
-> (DiskSnapshotState -> DiskSnapshotState -> Bool)
-> (DiskSnapshotState -> DiskSnapshotState -> Bool)
-> (DiskSnapshotState -> DiskSnapshotState -> Bool)
-> (DiskSnapshotState -> DiskSnapshotState -> DiskSnapshotState)
-> (DiskSnapshotState -> DiskSnapshotState -> DiskSnapshotState)
-> Ord 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
$cp1Ord :: Eq DiskSnapshotState
Prelude.Ord,
      (forall x. DiskSnapshotState -> Rep DiskSnapshotState x)
-> (forall x. Rep DiskSnapshotState x -> DiskSnapshotState)
-> Generic DiskSnapshotState
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
    ( Int -> DiskSnapshotState -> Int
DiskSnapshotState -> Int
(Int -> DiskSnapshotState -> Int)
-> (DiskSnapshotState -> Int) -> Hashable DiskSnapshotState
forall 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 -> ()
(DiskSnapshotState -> ()) -> NFData DiskSnapshotState
forall a. (a -> ()) -> NFData a
rnf :: DiskSnapshotState -> ()
$crnf :: DiskSnapshotState -> ()
Prelude.NFData,
      Text -> Either String DiskSnapshotState
(Text -> Either String DiskSnapshotState)
-> FromText DiskSnapshotState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String DiskSnapshotState
$cfromText :: Text -> Either String DiskSnapshotState
Core.FromText,
      DiskSnapshotState -> Text
(DiskSnapshotState -> Text) -> ToText DiskSnapshotState
forall a. (a -> Text) -> ToText a
toText :: DiskSnapshotState -> Text
$ctoText :: DiskSnapshotState -> Text
Core.ToText,
      DiskSnapshotState -> ByteString
(DiskSnapshotState -> ByteString) -> ToByteString DiskSnapshotState
forall a. (a -> ByteString) -> ToByteString a
toBS :: DiskSnapshotState -> ByteString
$ctoBS :: DiskSnapshotState -> ByteString
Core.ToByteString,
      DiskSnapshotState -> ByteStringBuilder
(DiskSnapshotState -> ByteStringBuilder) -> ToLog DiskSnapshotState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: DiskSnapshotState -> ByteStringBuilder
$cbuild :: DiskSnapshotState -> ByteStringBuilder
Core.ToLog,
      HeaderName -> DiskSnapshotState -> [Header]
(HeaderName -> DiskSnapshotState -> [Header])
-> ToHeader DiskSnapshotState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> DiskSnapshotState -> [Header]
$ctoHeader :: HeaderName -> DiskSnapshotState -> [Header]
Core.ToHeader,
      DiskSnapshotState -> QueryString
(DiskSnapshotState -> QueryString) -> ToQuery DiskSnapshotState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: DiskSnapshotState -> QueryString
$ctoQuery :: DiskSnapshotState -> QueryString
Core.ToQuery,
      Value -> Parser [DiskSnapshotState]
Value -> Parser DiskSnapshotState
(Value -> Parser DiskSnapshotState)
-> (Value -> Parser [DiskSnapshotState])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [DiskSnapshotState]
FromJSONKeyFunction DiskSnapshotState
FromJSONKeyFunction DiskSnapshotState
-> FromJSONKeyFunction [DiskSnapshotState]
-> FromJSONKey DiskSnapshotState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [DiskSnapshotState]
$cfromJSONKeyList :: FromJSONKeyFunction [DiskSnapshotState]
fromJSONKey :: FromJSONKeyFunction DiskSnapshotState
$cfromJSONKey :: FromJSONKeyFunction DiskSnapshotState
Core.FromJSONKey,
      [DiskSnapshotState] -> Encoding
[DiskSnapshotState] -> Value
DiskSnapshotState -> Encoding
DiskSnapshotState -> Value
(DiskSnapshotState -> Value)
-> (DiskSnapshotState -> Encoding)
-> ([DiskSnapshotState] -> Value)
-> ([DiskSnapshotState] -> Encoding)
-> ToJSON DiskSnapshotState
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
Core.ToJSON,
      ToJSONKeyFunction [DiskSnapshotState]
ToJSONKeyFunction DiskSnapshotState
ToJSONKeyFunction DiskSnapshotState
-> ToJSONKeyFunction [DiskSnapshotState]
-> ToJSONKey DiskSnapshotState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [DiskSnapshotState]
$ctoJSONKeyList :: ToJSONKeyFunction [DiskSnapshotState]
toJSONKey :: ToJSONKeyFunction DiskSnapshotState
$ctoJSONKey :: ToJSONKeyFunction DiskSnapshotState
Core.ToJSONKey,
      [Node] -> Either String DiskSnapshotState
([Node] -> Either String DiskSnapshotState)
-> FromXML DiskSnapshotState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String DiskSnapshotState
$cparseXML :: [Node] -> Either String DiskSnapshotState
Core.FromXML,
      DiskSnapshotState -> XML
(DiskSnapshotState -> XML) -> ToXML DiskSnapshotState
forall a. (a -> XML) -> ToXML a
toXML :: DiskSnapshotState -> XML
$ctoXML :: DiskSnapshotState -> XML
Core.ToXML
    )

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

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

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

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

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