{-# 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.CreateAccountState
-- 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.CreateAccountState
  ( CreateAccountState
      ( ..,
        CreateAccountState_FAILED,
        CreateAccountState_IN_PROGRESS,
        CreateAccountState_SUCCEEDED
      ),
  )
where

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

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

pattern CreateAccountState_FAILED :: CreateAccountState
pattern $bCreateAccountState_FAILED :: CreateAccountState
$mCreateAccountState_FAILED :: forall r. CreateAccountState -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountState_FAILED = CreateAccountState' "FAILED"

pattern CreateAccountState_IN_PROGRESS :: CreateAccountState
pattern $bCreateAccountState_IN_PROGRESS :: CreateAccountState
$mCreateAccountState_IN_PROGRESS :: forall r. CreateAccountState -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountState_IN_PROGRESS = CreateAccountState' "IN_PROGRESS"

pattern CreateAccountState_SUCCEEDED :: CreateAccountState
pattern $bCreateAccountState_SUCCEEDED :: CreateAccountState
$mCreateAccountState_SUCCEEDED :: forall r. CreateAccountState -> (Void# -> r) -> (Void# -> r) -> r
CreateAccountState_SUCCEEDED = CreateAccountState' "SUCCEEDED"

{-# COMPLETE
  CreateAccountState_FAILED,
  CreateAccountState_IN_PROGRESS,
  CreateAccountState_SUCCEEDED,
  CreateAccountState'
  #-}