{-# 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.ParentType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Organizations.Types.ParentType
  ( ParentType
      ( ..,
        ParentType_ORGANIZATIONAL_UNIT,
        ParentType_ROOT
      ),
  )
where

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

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

pattern ParentType_ORGANIZATIONAL_UNIT :: ParentType
pattern $bParentType_ORGANIZATIONAL_UNIT :: ParentType
$mParentType_ORGANIZATIONAL_UNIT :: forall {r}. ParentType -> ((# #) -> r) -> ((# #) -> r) -> r
ParentType_ORGANIZATIONAL_UNIT = ParentType' "ORGANIZATIONAL_UNIT"

pattern ParentType_ROOT :: ParentType
pattern $bParentType_ROOT :: ParentType
$mParentType_ROOT :: forall {r}. ParentType -> ((# #) -> r) -> ((# #) -> r) -> r
ParentType_ROOT = ParentType' "ROOT"

{-# COMPLETE
  ParentType_ORGANIZATIONAL_UNIT,
  ParentType_ROOT,
  ParentType'
  #-}