{-# 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.DirectoryService.Types.TopicStatus
-- 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.DirectoryService.Types.TopicStatus
  ( TopicStatus
      ( ..,
        TopicStatus_Deleted,
        TopicStatus_Failed,
        TopicStatus_Registered,
        TopicStatus_Topic_not_found
      ),
  )
where

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

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

pattern TopicStatus_Deleted :: TopicStatus
pattern $bTopicStatus_Deleted :: TopicStatus
$mTopicStatus_Deleted :: forall r. TopicStatus -> (Void# -> r) -> (Void# -> r) -> r
TopicStatus_Deleted = TopicStatus' "Deleted"

pattern TopicStatus_Failed :: TopicStatus
pattern $bTopicStatus_Failed :: TopicStatus
$mTopicStatus_Failed :: forall r. TopicStatus -> (Void# -> r) -> (Void# -> r) -> r
TopicStatus_Failed = TopicStatus' "Failed"

pattern TopicStatus_Registered :: TopicStatus
pattern $bTopicStatus_Registered :: TopicStatus
$mTopicStatus_Registered :: forall r. TopicStatus -> (Void# -> r) -> (Void# -> r) -> r
TopicStatus_Registered = TopicStatus' "Registered"

pattern TopicStatus_Topic_not_found :: TopicStatus
pattern $bTopicStatus_Topic_not_found :: TopicStatus
$mTopicStatus_Topic_not_found :: forall r. TopicStatus -> (Void# -> r) -> (Void# -> r) -> r
TopicStatus_Topic_not_found = TopicStatus' "Topic not found"

{-# COMPLETE
  TopicStatus_Deleted,
  TopicStatus_Failed,
  TopicStatus_Registered,
  TopicStatus_Topic_not_found,
  TopicStatus'
  #-}