{-# 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.PortalState
-- 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.PortalState
  ( PortalState
      ( ..,
        PortalState_ACTIVE,
        PortalState_CREATING,
        PortalState_DELETING,
        PortalState_FAILED,
        PortalState_UPDATING
      ),
  )
where

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

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

pattern PortalState_ACTIVE :: PortalState
pattern $bPortalState_ACTIVE :: PortalState
$mPortalState_ACTIVE :: forall r. PortalState -> (Void# -> r) -> (Void# -> r) -> r
PortalState_ACTIVE = PortalState' "ACTIVE"

pattern PortalState_CREATING :: PortalState
pattern $bPortalState_CREATING :: PortalState
$mPortalState_CREATING :: forall r. PortalState -> (Void# -> r) -> (Void# -> r) -> r
PortalState_CREATING = PortalState' "CREATING"

pattern PortalState_DELETING :: PortalState
pattern $bPortalState_DELETING :: PortalState
$mPortalState_DELETING :: forall r. PortalState -> (Void# -> r) -> (Void# -> r) -> r
PortalState_DELETING = PortalState' "DELETING"

pattern PortalState_FAILED :: PortalState
pattern $bPortalState_FAILED :: PortalState
$mPortalState_FAILED :: forall r. PortalState -> (Void# -> r) -> (Void# -> r) -> r
PortalState_FAILED = PortalState' "FAILED"

pattern PortalState_UPDATING :: PortalState
pattern $bPortalState_UPDATING :: PortalState
$mPortalState_UPDATING :: forall r. PortalState -> (Void# -> r) -> (Void# -> r) -> r
PortalState_UPDATING = PortalState' "UPDATING"

{-# COMPLETE
  PortalState_ACTIVE,
  PortalState_CREATING,
  PortalState_DELETING,
  PortalState_FAILED,
  PortalState_UPDATING,
  PortalState'
  #-}