{-# 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.AccessAnalyzer.Types.ReasonCode
-- 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.AccessAnalyzer.Types.ReasonCode
  ( ReasonCode
      ( ..,
        ReasonCode_AWS_SERVICE_ACCESS_DISABLED,
        ReasonCode_DELEGATED_ADMINISTRATOR_DEREGISTERED,
        ReasonCode_ORGANIZATION_DELETED,
        ReasonCode_SERVICE_LINKED_ROLE_CREATION_FAILED
      ),
  )
where

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

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

pattern ReasonCode_AWS_SERVICE_ACCESS_DISABLED :: ReasonCode
pattern $bReasonCode_AWS_SERVICE_ACCESS_DISABLED :: ReasonCode
$mReasonCode_AWS_SERVICE_ACCESS_DISABLED :: forall r. ReasonCode -> (Void# -> r) -> (Void# -> r) -> r
ReasonCode_AWS_SERVICE_ACCESS_DISABLED = ReasonCode' "AWS_SERVICE_ACCESS_DISABLED"

pattern ReasonCode_DELEGATED_ADMINISTRATOR_DEREGISTERED :: ReasonCode
pattern $bReasonCode_DELEGATED_ADMINISTRATOR_DEREGISTERED :: ReasonCode
$mReasonCode_DELEGATED_ADMINISTRATOR_DEREGISTERED :: forall r. ReasonCode -> (Void# -> r) -> (Void# -> r) -> r
ReasonCode_DELEGATED_ADMINISTRATOR_DEREGISTERED = ReasonCode' "DELEGATED_ADMINISTRATOR_DEREGISTERED"

pattern ReasonCode_ORGANIZATION_DELETED :: ReasonCode
pattern $bReasonCode_ORGANIZATION_DELETED :: ReasonCode
$mReasonCode_ORGANIZATION_DELETED :: forall r. ReasonCode -> (Void# -> r) -> (Void# -> r) -> r
ReasonCode_ORGANIZATION_DELETED = ReasonCode' "ORGANIZATION_DELETED"

pattern ReasonCode_SERVICE_LINKED_ROLE_CREATION_FAILED :: ReasonCode
pattern $bReasonCode_SERVICE_LINKED_ROLE_CREATION_FAILED :: ReasonCode
$mReasonCode_SERVICE_LINKED_ROLE_CREATION_FAILED :: forall r. ReasonCode -> (Void# -> r) -> (Void# -> r) -> r
ReasonCode_SERVICE_LINKED_ROLE_CREATION_FAILED = ReasonCode' "SERVICE_LINKED_ROLE_CREATION_FAILED"

{-# COMPLETE
  ReasonCode_AWS_SERVICE_ACCESS_DISABLED,
  ReasonCode_DELEGATED_ADMINISTRATOR_DEREGISTERED,
  ReasonCode_ORGANIZATION_DELETED,
  ReasonCode_SERVICE_LINKED_ROLE_CREATION_FAILED,
  ReasonCode'
  #-}