{-# 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.IotTwinMaker.Types.State
-- 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.IotTwinMaker.Types.State
  ( State
      ( ..,
        State_ACTIVE,
        State_CREATING,
        State_DELETING,
        State_ERROR,
        State_UPDATING
      ),
  )
where

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

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

pattern State_ACTIVE :: State
pattern $bState_ACTIVE :: State
$mState_ACTIVE :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_ACTIVE = State' "ACTIVE"

pattern State_CREATING :: State
pattern $bState_CREATING :: State
$mState_CREATING :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_CREATING = State' "CREATING"

pattern State_DELETING :: State
pattern $bState_DELETING :: State
$mState_DELETING :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_DELETING = State' "DELETING"

pattern State_ERROR :: State
pattern $bState_ERROR :: State
$mState_ERROR :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_ERROR = State' "ERROR"

pattern State_UPDATING :: State
pattern $bState_UPDATING :: State
$mState_UPDATING :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_UPDATING = State' "UPDATING"

{-# COMPLETE
  State_ACTIVE,
  State_CREATING,
  State_DELETING,
  State_ERROR,
  State_UPDATING,
  State'
  #-}