{-# 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.SnowDeviceManagement.Types.InstanceStateName
-- 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.SnowDeviceManagement.Types.InstanceStateName
  ( InstanceStateName
      ( ..,
        InstanceStateName_PENDING,
        InstanceStateName_RUNNING,
        InstanceStateName_SHUTTING_DOWN,
        InstanceStateName_STOPPED,
        InstanceStateName_STOPPING,
        InstanceStateName_TERMINATED
      ),
  )
where

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

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

pattern InstanceStateName_PENDING :: InstanceStateName
pattern $bInstanceStateName_PENDING :: InstanceStateName
$mInstanceStateName_PENDING :: forall r. InstanceStateName -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateName_PENDING = InstanceStateName' "PENDING"

pattern InstanceStateName_RUNNING :: InstanceStateName
pattern $bInstanceStateName_RUNNING :: InstanceStateName
$mInstanceStateName_RUNNING :: forall r. InstanceStateName -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateName_RUNNING = InstanceStateName' "RUNNING"

pattern InstanceStateName_SHUTTING_DOWN :: InstanceStateName
pattern $bInstanceStateName_SHUTTING_DOWN :: InstanceStateName
$mInstanceStateName_SHUTTING_DOWN :: forall r. InstanceStateName -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateName_SHUTTING_DOWN = InstanceStateName' "SHUTTING_DOWN"

pattern InstanceStateName_STOPPED :: InstanceStateName
pattern $bInstanceStateName_STOPPED :: InstanceStateName
$mInstanceStateName_STOPPED :: forall r. InstanceStateName -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateName_STOPPED = InstanceStateName' "STOPPED"

pattern InstanceStateName_STOPPING :: InstanceStateName
pattern $bInstanceStateName_STOPPING :: InstanceStateName
$mInstanceStateName_STOPPING :: forall r. InstanceStateName -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateName_STOPPING = InstanceStateName' "STOPPING"

pattern InstanceStateName_TERMINATED :: InstanceStateName
pattern $bInstanceStateName_TERMINATED :: InstanceStateName
$mInstanceStateName_TERMINATED :: forall r. InstanceStateName -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateName_TERMINATED = InstanceStateName' "TERMINATED"

{-# COMPLETE
  InstanceStateName_PENDING,
  InstanceStateName_RUNNING,
  InstanceStateName_SHUTTING_DOWN,
  InstanceStateName_STOPPED,
  InstanceStateName_STOPPING,
  InstanceStateName_TERMINATED,
  InstanceStateName'
  #-}