{-# 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.PolicyTypeStatus
-- 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.PolicyTypeStatus
  ( PolicyTypeStatus
      ( ..,
        PolicyTypeStatus_ENABLED,
        PolicyTypeStatus_PENDING_DISABLE,
        PolicyTypeStatus_PENDING_ENABLE
      ),
  )
where

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

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

pattern PolicyTypeStatus_ENABLED :: PolicyTypeStatus
pattern $bPolicyTypeStatus_ENABLED :: PolicyTypeStatus
$mPolicyTypeStatus_ENABLED :: forall r. PolicyTypeStatus -> (Void# -> r) -> (Void# -> r) -> r
PolicyTypeStatus_ENABLED = PolicyTypeStatus' "ENABLED"

pattern PolicyTypeStatus_PENDING_DISABLE :: PolicyTypeStatus
pattern $bPolicyTypeStatus_PENDING_DISABLE :: PolicyTypeStatus
$mPolicyTypeStatus_PENDING_DISABLE :: forall r. PolicyTypeStatus -> (Void# -> r) -> (Void# -> r) -> r
PolicyTypeStatus_PENDING_DISABLE = PolicyTypeStatus' "PENDING_DISABLE"

pattern PolicyTypeStatus_PENDING_ENABLE :: PolicyTypeStatus
pattern $bPolicyTypeStatus_PENDING_ENABLE :: PolicyTypeStatus
$mPolicyTypeStatus_PENDING_ENABLE :: forall r. PolicyTypeStatus -> (Void# -> r) -> (Void# -> r) -> r
PolicyTypeStatus_PENDING_ENABLE = PolicyTypeStatus' "PENDING_ENABLE"

{-# COMPLETE
  PolicyTypeStatus_ENABLED,
  PolicyTypeStatus_PENDING_DISABLE,
  PolicyTypeStatus_PENDING_ENABLE,
  PolicyTypeStatus'
  #-}