{-# 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.CloudFormation.Types.ChangeSource
-- 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.CloudFormation.Types.ChangeSource
  ( ChangeSource
      ( ..,
        ChangeSource_Automatic,
        ChangeSource_DirectModification,
        ChangeSource_ParameterReference,
        ChangeSource_ResourceAttribute,
        ChangeSource_ResourceReference
      ),
  )
where

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

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

pattern ChangeSource_Automatic :: ChangeSource
pattern $bChangeSource_Automatic :: ChangeSource
$mChangeSource_Automatic :: forall r. ChangeSource -> (Void# -> r) -> (Void# -> r) -> r
ChangeSource_Automatic = ChangeSource' "Automatic"

pattern ChangeSource_DirectModification :: ChangeSource
pattern $bChangeSource_DirectModification :: ChangeSource
$mChangeSource_DirectModification :: forall r. ChangeSource -> (Void# -> r) -> (Void# -> r) -> r
ChangeSource_DirectModification = ChangeSource' "DirectModification"

pattern ChangeSource_ParameterReference :: ChangeSource
pattern $bChangeSource_ParameterReference :: ChangeSource
$mChangeSource_ParameterReference :: forall r. ChangeSource -> (Void# -> r) -> (Void# -> r) -> r
ChangeSource_ParameterReference = ChangeSource' "ParameterReference"

pattern ChangeSource_ResourceAttribute :: ChangeSource
pattern $bChangeSource_ResourceAttribute :: ChangeSource
$mChangeSource_ResourceAttribute :: forall r. ChangeSource -> (Void# -> r) -> (Void# -> r) -> r
ChangeSource_ResourceAttribute = ChangeSource' "ResourceAttribute"

pattern ChangeSource_ResourceReference :: ChangeSource
pattern $bChangeSource_ResourceReference :: ChangeSource
$mChangeSource_ResourceReference :: forall r. ChangeSource -> (Void# -> r) -> (Void# -> r) -> r
ChangeSource_ResourceReference = ChangeSource' "ResourceReference"

{-# COMPLETE
  ChangeSource_Automatic,
  ChangeSource_DirectModification,
  ChangeSource_ParameterReference,
  ChangeSource_ResourceAttribute,
  ChangeSource_ResourceReference,
  ChangeSource'
  #-}