{-# 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.MGN.Types.DataReplicationState
-- 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.MGN.Types.DataReplicationState
  ( DataReplicationState
      ( ..,
        DataReplicationState_BACKLOG,
        DataReplicationState_CONTINUOUS,
        DataReplicationState_CREATING_SNAPSHOT,
        DataReplicationState_DISCONNECTED,
        DataReplicationState_INITIAL_SYNC,
        DataReplicationState_INITIATING,
        DataReplicationState_PAUSED,
        DataReplicationState_RESCAN,
        DataReplicationState_STALLED,
        DataReplicationState_STOPPED
      ),
  )
where

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

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

pattern DataReplicationState_BACKLOG :: DataReplicationState
pattern $bDataReplicationState_BACKLOG :: DataReplicationState
$mDataReplicationState_BACKLOG :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_BACKLOG = DataReplicationState' "BACKLOG"

pattern DataReplicationState_CONTINUOUS :: DataReplicationState
pattern $bDataReplicationState_CONTINUOUS :: DataReplicationState
$mDataReplicationState_CONTINUOUS :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_CONTINUOUS = DataReplicationState' "CONTINUOUS"

pattern DataReplicationState_CREATING_SNAPSHOT :: DataReplicationState
pattern $bDataReplicationState_CREATING_SNAPSHOT :: DataReplicationState
$mDataReplicationState_CREATING_SNAPSHOT :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_CREATING_SNAPSHOT = DataReplicationState' "CREATING_SNAPSHOT"

pattern DataReplicationState_DISCONNECTED :: DataReplicationState
pattern $bDataReplicationState_DISCONNECTED :: DataReplicationState
$mDataReplicationState_DISCONNECTED :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_DISCONNECTED = DataReplicationState' "DISCONNECTED"

pattern DataReplicationState_INITIAL_SYNC :: DataReplicationState
pattern $bDataReplicationState_INITIAL_SYNC :: DataReplicationState
$mDataReplicationState_INITIAL_SYNC :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_INITIAL_SYNC = DataReplicationState' "INITIAL_SYNC"

pattern DataReplicationState_INITIATING :: DataReplicationState
pattern $bDataReplicationState_INITIATING :: DataReplicationState
$mDataReplicationState_INITIATING :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_INITIATING = DataReplicationState' "INITIATING"

pattern DataReplicationState_PAUSED :: DataReplicationState
pattern $bDataReplicationState_PAUSED :: DataReplicationState
$mDataReplicationState_PAUSED :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_PAUSED = DataReplicationState' "PAUSED"

pattern DataReplicationState_RESCAN :: DataReplicationState
pattern $bDataReplicationState_RESCAN :: DataReplicationState
$mDataReplicationState_RESCAN :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_RESCAN = DataReplicationState' "RESCAN"

pattern DataReplicationState_STALLED :: DataReplicationState
pattern $bDataReplicationState_STALLED :: DataReplicationState
$mDataReplicationState_STALLED :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_STALLED = DataReplicationState' "STALLED"

pattern DataReplicationState_STOPPED :: DataReplicationState
pattern $bDataReplicationState_STOPPED :: DataReplicationState
$mDataReplicationState_STOPPED :: forall r. DataReplicationState -> (Void# -> r) -> (Void# -> r) -> r
DataReplicationState_STOPPED = DataReplicationState' "STOPPED"

{-# COMPLETE
  DataReplicationState_BACKLOG,
  DataReplicationState_CONTINUOUS,
  DataReplicationState_CREATING_SNAPSHOT,
  DataReplicationState_DISCONNECTED,
  DataReplicationState_INITIAL_SYNC,
  DataReplicationState_INITIATING,
  DataReplicationState_PAUSED,
  DataReplicationState_RESCAN,
  DataReplicationState_STALLED,
  DataReplicationState_STOPPED,
  DataReplicationState'
  #-}