{-# 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.DMS.Types.SafeguardPolicy
-- 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.DMS.Types.SafeguardPolicy
  ( SafeguardPolicy
      ( ..,
        SafeguardPolicy_Exclusive_automatic_truncation,
        SafeguardPolicy_Rely_on_sql_server_replication_agent,
        SafeguardPolicy_Shared_automatic_truncation
      ),
  )
where

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

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

pattern SafeguardPolicy_Exclusive_automatic_truncation :: SafeguardPolicy
pattern $bSafeguardPolicy_Exclusive_automatic_truncation :: SafeguardPolicy
$mSafeguardPolicy_Exclusive_automatic_truncation :: forall r. SafeguardPolicy -> (Void# -> r) -> (Void# -> r) -> r
SafeguardPolicy_Exclusive_automatic_truncation = SafeguardPolicy' "exclusive-automatic-truncation"

pattern SafeguardPolicy_Rely_on_sql_server_replication_agent :: SafeguardPolicy
pattern $bSafeguardPolicy_Rely_on_sql_server_replication_agent :: SafeguardPolicy
$mSafeguardPolicy_Rely_on_sql_server_replication_agent :: forall r. SafeguardPolicy -> (Void# -> r) -> (Void# -> r) -> r
SafeguardPolicy_Rely_on_sql_server_replication_agent = SafeguardPolicy' "rely-on-sql-server-replication-agent"

pattern SafeguardPolicy_Shared_automatic_truncation :: SafeguardPolicy
pattern $bSafeguardPolicy_Shared_automatic_truncation :: SafeguardPolicy
$mSafeguardPolicy_Shared_automatic_truncation :: forall r. SafeguardPolicy -> (Void# -> r) -> (Void# -> r) -> r
SafeguardPolicy_Shared_automatic_truncation = SafeguardPolicy' "shared-automatic-truncation"

{-# COMPLETE
  SafeguardPolicy_Exclusive_automatic_truncation,
  SafeguardPolicy_Rely_on_sql_server_replication_agent,
  SafeguardPolicy_Shared_automatic_truncation,
  SafeguardPolicy'
  #-}