{-# 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.CloudDirectory.Types.DirectoryState
-- 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.CloudDirectory.Types.DirectoryState
  ( DirectoryState
      ( ..,
        DirectoryState_DELETED,
        DirectoryState_DISABLED,
        DirectoryState_ENABLED
      ),
  )
where

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

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

pattern DirectoryState_DELETED :: DirectoryState
pattern $bDirectoryState_DELETED :: DirectoryState
$mDirectoryState_DELETED :: forall r. DirectoryState -> (Void# -> r) -> (Void# -> r) -> r
DirectoryState_DELETED = DirectoryState' "DELETED"

pattern DirectoryState_DISABLED :: DirectoryState
pattern $bDirectoryState_DISABLED :: DirectoryState
$mDirectoryState_DISABLED :: forall r. DirectoryState -> (Void# -> r) -> (Void# -> r) -> r
DirectoryState_DISABLED = DirectoryState' "DISABLED"

pattern DirectoryState_ENABLED :: DirectoryState
pattern $bDirectoryState_ENABLED :: DirectoryState
$mDirectoryState_ENABLED :: forall r. DirectoryState -> (Void# -> r) -> (Void# -> r) -> r
DirectoryState_ENABLED = DirectoryState' "ENABLED"

{-# COMPLETE
  DirectoryState_DELETED,
  DirectoryState_DISABLED,
  DirectoryState_ENABLED,
  DirectoryState'
  #-}