{-# 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.IoTSiteWise.Types.AssetState
-- 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.IoTSiteWise.Types.AssetState
  ( AssetState
      ( ..,
        AssetState_ACTIVE,
        AssetState_CREATING,
        AssetState_DELETING,
        AssetState_FAILED,
        AssetState_UPDATING
      ),
  )
where

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

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

pattern AssetState_ACTIVE :: AssetState
pattern $bAssetState_ACTIVE :: AssetState
$mAssetState_ACTIVE :: forall r. AssetState -> (Void# -> r) -> (Void# -> r) -> r
AssetState_ACTIVE = AssetState' "ACTIVE"

pattern AssetState_CREATING :: AssetState
pattern $bAssetState_CREATING :: AssetState
$mAssetState_CREATING :: forall r. AssetState -> (Void# -> r) -> (Void# -> r) -> r
AssetState_CREATING = AssetState' "CREATING"

pattern AssetState_DELETING :: AssetState
pattern $bAssetState_DELETING :: AssetState
$mAssetState_DELETING :: forall r. AssetState -> (Void# -> r) -> (Void# -> r) -> r
AssetState_DELETING = AssetState' "DELETING"

pattern AssetState_FAILED :: AssetState
pattern $bAssetState_FAILED :: AssetState
$mAssetState_FAILED :: forall r. AssetState -> (Void# -> r) -> (Void# -> r) -> r
AssetState_FAILED = AssetState' "FAILED"

pattern AssetState_UPDATING :: AssetState
pattern $bAssetState_UPDATING :: AssetState
$mAssetState_UPDATING :: forall r. AssetState -> (Void# -> r) -> (Void# -> r) -> r
AssetState_UPDATING = AssetState' "UPDATING"

{-# COMPLETE
  AssetState_ACTIVE,
  AssetState_CREATING,
  AssetState_DELETING,
  AssetState_FAILED,
  AssetState_UPDATING,
  AssetState'
  #-}