{-# 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.ResourceGroupsTagging.Types.TargetIdType
-- 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.ResourceGroupsTagging.Types.TargetIdType
  ( TargetIdType
      ( ..,
        TargetIdType_ACCOUNT,
        TargetIdType_OU,
        TargetIdType_ROOT
      ),
  )
where

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

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

pattern TargetIdType_ACCOUNT :: TargetIdType
pattern $bTargetIdType_ACCOUNT :: TargetIdType
$mTargetIdType_ACCOUNT :: forall r. TargetIdType -> (Void# -> r) -> (Void# -> r) -> r
TargetIdType_ACCOUNT = TargetIdType' "ACCOUNT"

pattern TargetIdType_OU :: TargetIdType
pattern $bTargetIdType_OU :: TargetIdType
$mTargetIdType_OU :: forall r. TargetIdType -> (Void# -> r) -> (Void# -> r) -> r
TargetIdType_OU = TargetIdType' "OU"

pattern TargetIdType_ROOT :: TargetIdType
pattern $bTargetIdType_ROOT :: TargetIdType
$mTargetIdType_ROOT :: forall r. TargetIdType -> (Void# -> r) -> (Void# -> r) -> r
TargetIdType_ROOT = TargetIdType' "ROOT"

{-# COMPLETE
  TargetIdType_ACCOUNT,
  TargetIdType_OU,
  TargetIdType_ROOT,
  TargetIdType'
  #-}