{-# 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.Braket.Types.CancellationStatus
-- 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.Braket.Types.CancellationStatus
  ( CancellationStatus
      ( ..,
        CancellationStatus_CANCELLED,
        CancellationStatus_CANCELLING
      ),
  )
where

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

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

pattern CancellationStatus_CANCELLED :: CancellationStatus
pattern $bCancellationStatus_CANCELLED :: CancellationStatus
$mCancellationStatus_CANCELLED :: forall r. CancellationStatus -> (Void# -> r) -> (Void# -> r) -> r
CancellationStatus_CANCELLED = CancellationStatus' "CANCELLED"

pattern CancellationStatus_CANCELLING :: CancellationStatus
pattern $bCancellationStatus_CANCELLING :: CancellationStatus
$mCancellationStatus_CANCELLING :: forall r. CancellationStatus -> (Void# -> r) -> (Void# -> r) -> r
CancellationStatus_CANCELLING = CancellationStatus' "CANCELLING"

{-# COMPLETE
  CancellationStatus_CANCELLED,
  CancellationStatus_CANCELLING,
  CancellationStatus'
  #-}