{-# 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.WorkMail.Types.EntityState
-- 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.WorkMail.Types.EntityState
  ( EntityState
      ( ..,
        EntityState_DELETED,
        EntityState_DISABLED,
        EntityState_ENABLED
      ),
  )
where

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

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

pattern EntityState_DELETED :: EntityState
pattern $bEntityState_DELETED :: EntityState
$mEntityState_DELETED :: forall r. EntityState -> (Void# -> r) -> (Void# -> r) -> r
EntityState_DELETED = EntityState' "DELETED"

pattern EntityState_DISABLED :: EntityState
pattern $bEntityState_DISABLED :: EntityState
$mEntityState_DISABLED :: forall r. EntityState -> (Void# -> r) -> (Void# -> r) -> r
EntityState_DISABLED = EntityState' "DISABLED"

pattern EntityState_ENABLED :: EntityState
pattern $bEntityState_ENABLED :: EntityState
$mEntityState_ENABLED :: forall r. EntityState -> (Void# -> r) -> (Void# -> r) -> r
EntityState_ENABLED = EntityState' "ENABLED"

{-# COMPLETE
  EntityState_DELETED,
  EntityState_DISABLED,
  EntityState_ENABLED,
  EntityState'
  #-}