{-# 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.DataSync.Types.PhaseStatus
-- 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.DataSync.Types.PhaseStatus
  ( PhaseStatus
      ( ..,
        PhaseStatus_ERROR,
        PhaseStatus_PENDING,
        PhaseStatus_SUCCESS
      ),
  )
where

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

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

pattern PhaseStatus_ERROR :: PhaseStatus
pattern $bPhaseStatus_ERROR :: PhaseStatus
$mPhaseStatus_ERROR :: forall r. PhaseStatus -> (Void# -> r) -> (Void# -> r) -> r
PhaseStatus_ERROR = PhaseStatus' "ERROR"

pattern PhaseStatus_PENDING :: PhaseStatus
pattern $bPhaseStatus_PENDING :: PhaseStatus
$mPhaseStatus_PENDING :: forall r. PhaseStatus -> (Void# -> r) -> (Void# -> r) -> r
PhaseStatus_PENDING = PhaseStatus' "PENDING"

pattern PhaseStatus_SUCCESS :: PhaseStatus
pattern $bPhaseStatus_SUCCESS :: PhaseStatus
$mPhaseStatus_SUCCESS :: forall r. PhaseStatus -> (Void# -> r) -> (Void# -> r) -> r
PhaseStatus_SUCCESS = PhaseStatus' "SUCCESS"

{-# COMPLETE
  PhaseStatus_ERROR,
  PhaseStatus_PENDING,
  PhaseStatus_SUCCESS,
  PhaseStatus'
  #-}