{-# 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.SWF.Types.ChildPolicy
-- 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.SWF.Types.ChildPolicy
  ( ChildPolicy
      ( ..,
        ChildPolicy_ABANDON,
        ChildPolicy_REQUEST_CANCEL,
        ChildPolicy_TERMINATE
      ),
  )
where

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

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

pattern ChildPolicy_ABANDON :: ChildPolicy
pattern $bChildPolicy_ABANDON :: ChildPolicy
$mChildPolicy_ABANDON :: forall r. ChildPolicy -> (Void# -> r) -> (Void# -> r) -> r
ChildPolicy_ABANDON = ChildPolicy' "ABANDON"

pattern ChildPolicy_REQUEST_CANCEL :: ChildPolicy
pattern $bChildPolicy_REQUEST_CANCEL :: ChildPolicy
$mChildPolicy_REQUEST_CANCEL :: forall r. ChildPolicy -> (Void# -> r) -> (Void# -> r) -> r
ChildPolicy_REQUEST_CANCEL = ChildPolicy' "REQUEST_CANCEL"

pattern ChildPolicy_TERMINATE :: ChildPolicy
pattern $bChildPolicy_TERMINATE :: ChildPolicy
$mChildPolicy_TERMINATE :: forall r. ChildPolicy -> (Void# -> r) -> (Void# -> r) -> r
ChildPolicy_TERMINATE = ChildPolicy' "TERMINATE"

{-# COMPLETE
  ChildPolicy_ABANDON,
  ChildPolicy_REQUEST_CANCEL,
  ChildPolicy_TERMINATE,
  ChildPolicy'
  #-}