{-# 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.Organizations.Types.CreateAccountFailureReason
-- 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.Organizations.Types.CreateAccountFailureReason
  ( CreateAccountFailureReason
      ( ..,
        CreateAccountFailureReason_ACCOUNT_LIMIT_EXCEEDED,
        CreateAccountFailureReason_CONCURRENT_ACCOUNT_MODIFICATION,
        CreateAccountFailureReason_EMAIL_ALREADY_EXISTS,
        CreateAccountFailureReason_FAILED_BUSINESS_VALIDATION,
        CreateAccountFailureReason_GOVCLOUD_ACCOUNT_ALREADY_EXISTS,
        CreateAccountFailureReason_INTERNAL_FAILURE,
        CreateAccountFailureReason_INVALID_ADDRESS,
        CreateAccountFailureReason_INVALID_EMAIL,
        CreateAccountFailureReason_INVALID_IDENTITY_FOR_BUSINESS_VALIDATION,
        CreateAccountFailureReason_MISSING_BUSINESS_VALIDATION,
        CreateAccountFailureReason_MISSING_PAYMENT_INSTRUMENT,
        CreateAccountFailureReason_PENDING_BUSINESS_VALIDATION,
        CreateAccountFailureReason_UNKNOWN_BUSINESS_VALIDATION
      ),
  )
where

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

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

pattern CreateAccountFailureReason_ACCOUNT_LIMIT_EXCEEDED :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_ACCOUNT_LIMIT_EXCEEDED :: CreateAccountFailureReason
$mCreateAccountFailureReason_ACCOUNT_LIMIT_EXCEEDED :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_ACCOUNT_LIMIT_EXCEEDED = CreateAccountFailureReason' "ACCOUNT_LIMIT_EXCEEDED"

pattern CreateAccountFailureReason_CONCURRENT_ACCOUNT_MODIFICATION :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_CONCURRENT_ACCOUNT_MODIFICATION :: CreateAccountFailureReason
$mCreateAccountFailureReason_CONCURRENT_ACCOUNT_MODIFICATION :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_CONCURRENT_ACCOUNT_MODIFICATION = CreateAccountFailureReason' "CONCURRENT_ACCOUNT_MODIFICATION"

pattern CreateAccountFailureReason_EMAIL_ALREADY_EXISTS :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_EMAIL_ALREADY_EXISTS :: CreateAccountFailureReason
$mCreateAccountFailureReason_EMAIL_ALREADY_EXISTS :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_EMAIL_ALREADY_EXISTS = CreateAccountFailureReason' "EMAIL_ALREADY_EXISTS"

pattern CreateAccountFailureReason_FAILED_BUSINESS_VALIDATION :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_FAILED_BUSINESS_VALIDATION :: CreateAccountFailureReason
$mCreateAccountFailureReason_FAILED_BUSINESS_VALIDATION :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_FAILED_BUSINESS_VALIDATION = CreateAccountFailureReason' "FAILED_BUSINESS_VALIDATION"

pattern CreateAccountFailureReason_GOVCLOUD_ACCOUNT_ALREADY_EXISTS :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_GOVCLOUD_ACCOUNT_ALREADY_EXISTS :: CreateAccountFailureReason
$mCreateAccountFailureReason_GOVCLOUD_ACCOUNT_ALREADY_EXISTS :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_GOVCLOUD_ACCOUNT_ALREADY_EXISTS = CreateAccountFailureReason' "GOVCLOUD_ACCOUNT_ALREADY_EXISTS"

pattern CreateAccountFailureReason_INTERNAL_FAILURE :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_INTERNAL_FAILURE :: CreateAccountFailureReason
$mCreateAccountFailureReason_INTERNAL_FAILURE :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_INTERNAL_FAILURE = CreateAccountFailureReason' "INTERNAL_FAILURE"

pattern CreateAccountFailureReason_INVALID_ADDRESS :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_INVALID_ADDRESS :: CreateAccountFailureReason
$mCreateAccountFailureReason_INVALID_ADDRESS :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_INVALID_ADDRESS = CreateAccountFailureReason' "INVALID_ADDRESS"

pattern CreateAccountFailureReason_INVALID_EMAIL :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_INVALID_EMAIL :: CreateAccountFailureReason
$mCreateAccountFailureReason_INVALID_EMAIL :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_INVALID_EMAIL = CreateAccountFailureReason' "INVALID_EMAIL"

pattern CreateAccountFailureReason_INVALID_IDENTITY_FOR_BUSINESS_VALIDATION :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_INVALID_IDENTITY_FOR_BUSINESS_VALIDATION :: CreateAccountFailureReason
$mCreateAccountFailureReason_INVALID_IDENTITY_FOR_BUSINESS_VALIDATION :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_INVALID_IDENTITY_FOR_BUSINESS_VALIDATION = CreateAccountFailureReason' "INVALID_IDENTITY_FOR_BUSINESS_VALIDATION"

pattern CreateAccountFailureReason_MISSING_BUSINESS_VALIDATION :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_MISSING_BUSINESS_VALIDATION :: CreateAccountFailureReason
$mCreateAccountFailureReason_MISSING_BUSINESS_VALIDATION :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_MISSING_BUSINESS_VALIDATION = CreateAccountFailureReason' "MISSING_BUSINESS_VALIDATION"

pattern CreateAccountFailureReason_MISSING_PAYMENT_INSTRUMENT :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_MISSING_PAYMENT_INSTRUMENT :: CreateAccountFailureReason
$mCreateAccountFailureReason_MISSING_PAYMENT_INSTRUMENT :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_MISSING_PAYMENT_INSTRUMENT = CreateAccountFailureReason' "MISSING_PAYMENT_INSTRUMENT"

pattern CreateAccountFailureReason_PENDING_BUSINESS_VALIDATION :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_PENDING_BUSINESS_VALIDATION :: CreateAccountFailureReason
$mCreateAccountFailureReason_PENDING_BUSINESS_VALIDATION :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_PENDING_BUSINESS_VALIDATION = CreateAccountFailureReason' "PENDING_BUSINESS_VALIDATION"

pattern CreateAccountFailureReason_UNKNOWN_BUSINESS_VALIDATION :: CreateAccountFailureReason
pattern $bCreateAccountFailureReason_UNKNOWN_BUSINESS_VALIDATION :: CreateAccountFailureReason
$mCreateAccountFailureReason_UNKNOWN_BUSINESS_VALIDATION :: forall r.
CreateAccountFailureReason -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountFailureReason_UNKNOWN_BUSINESS_VALIDATION = CreateAccountFailureReason' "UNKNOWN_BUSINESS_VALIDATION"

{-# COMPLETE
  CreateAccountFailureReason_ACCOUNT_LIMIT_EXCEEDED,
  CreateAccountFailureReason_CONCURRENT_ACCOUNT_MODIFICATION,
  CreateAccountFailureReason_EMAIL_ALREADY_EXISTS,
  CreateAccountFailureReason_FAILED_BUSINESS_VALIDATION,
  CreateAccountFailureReason_GOVCLOUD_ACCOUNT_ALREADY_EXISTS,
  CreateAccountFailureReason_INTERNAL_FAILURE,
  CreateAccountFailureReason_INVALID_ADDRESS,
  CreateAccountFailureReason_INVALID_EMAIL,
  CreateAccountFailureReason_INVALID_IDENTITY_FOR_BUSINESS_VALIDATION,
  CreateAccountFailureReason_MISSING_BUSINESS_VALIDATION,
  CreateAccountFailureReason_MISSING_PAYMENT_INSTRUMENT,
  CreateAccountFailureReason_PENDING_BUSINESS_VALIDATION,
  CreateAccountFailureReason_UNKNOWN_BUSINESS_VALIDATION,
  CreateAccountFailureReason'
  #-}