{-# 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.InstanceSnapshotState
-- 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.InstanceSnapshotState
  ( InstanceSnapshotState
      ( ..,
        InstanceSnapshotState_Available,
        InstanceSnapshotState_Error,
        InstanceSnapshotState_Pending
      ),
  )
where

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

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

pattern InstanceSnapshotState_Available :: InstanceSnapshotState
pattern $bInstanceSnapshotState_Available :: InstanceSnapshotState
$mInstanceSnapshotState_Available :: forall r.
InstanceSnapshotState -> (Void# -> r) -> (Void# -> r) -> r
InstanceSnapshotState_Available = InstanceSnapshotState' "available"

pattern InstanceSnapshotState_Error :: InstanceSnapshotState
pattern $bInstanceSnapshotState_Error :: InstanceSnapshotState
$mInstanceSnapshotState_Error :: forall r.
InstanceSnapshotState -> (Void# -> r) -> (Void# -> r) -> r
InstanceSnapshotState_Error = InstanceSnapshotState' "error"

pattern InstanceSnapshotState_Pending :: InstanceSnapshotState
pattern $bInstanceSnapshotState_Pending :: InstanceSnapshotState
$mInstanceSnapshotState_Pending :: forall r.
InstanceSnapshotState -> (Void# -> r) -> (Void# -> r) -> r
InstanceSnapshotState_Pending = InstanceSnapshotState' "pending"

{-# COMPLETE
  InstanceSnapshotState_Available,
  InstanceSnapshotState_Error,
  InstanceSnapshotState_Pending,
  InstanceSnapshotState'
  #-}