{-# 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.ChildType
-- 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.ChildType
  ( ChildType
      ( ..,
        ChildType_ACCOUNT,
        ChildType_ORGANIZATIONAL_UNIT
      ),
  )
where

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

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

pattern ChildType_ACCOUNT :: ChildType
pattern $bChildType_ACCOUNT :: ChildType
$mChildType_ACCOUNT :: forall r. ChildType -> (Void# -> r) -> (Void# -> r) -> r
ChildType_ACCOUNT = ChildType' "ACCOUNT"

pattern ChildType_ORGANIZATIONAL_UNIT :: ChildType
pattern $bChildType_ORGANIZATIONAL_UNIT :: ChildType
$mChildType_ORGANIZATIONAL_UNIT :: forall r. ChildType -> (Void# -> r) -> (Void# -> r) -> r
ChildType_ORGANIZATIONAL_UNIT = ChildType' "ORGANIZATIONAL_UNIT"

{-# COMPLETE
  ChildType_ACCOUNT,
  ChildType_ORGANIZATIONAL_UNIT,
  ChildType'
  #-}