{-# 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.ECS.Types.ContainerInstanceStatus
-- 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.ECS.Types.ContainerInstanceStatus
  ( ContainerInstanceStatus
      ( ..,
        ContainerInstanceStatus_ACTIVE,
        ContainerInstanceStatus_DEREGISTERING,
        ContainerInstanceStatus_DRAINING,
        ContainerInstanceStatus_REGISTERING,
        ContainerInstanceStatus_REGISTRATION_FAILED
      ),
  )
where

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

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

pattern ContainerInstanceStatus_ACTIVE :: ContainerInstanceStatus
pattern $bContainerInstanceStatus_ACTIVE :: ContainerInstanceStatus
$mContainerInstanceStatus_ACTIVE :: forall r.
ContainerInstanceStatus -> (Void# -> r) -> (Void# -> r) -> r
ContainerInstanceStatus_ACTIVE = ContainerInstanceStatus' "ACTIVE"

pattern ContainerInstanceStatus_DEREGISTERING :: ContainerInstanceStatus
pattern $bContainerInstanceStatus_DEREGISTERING :: ContainerInstanceStatus
$mContainerInstanceStatus_DEREGISTERING :: forall r.
ContainerInstanceStatus -> (Void# -> r) -> (Void# -> r) -> r
ContainerInstanceStatus_DEREGISTERING = ContainerInstanceStatus' "DEREGISTERING"

pattern ContainerInstanceStatus_DRAINING :: ContainerInstanceStatus
pattern $bContainerInstanceStatus_DRAINING :: ContainerInstanceStatus
$mContainerInstanceStatus_DRAINING :: forall r.
ContainerInstanceStatus -> (Void# -> r) -> (Void# -> r) -> r
ContainerInstanceStatus_DRAINING = ContainerInstanceStatus' "DRAINING"

pattern ContainerInstanceStatus_REGISTERING :: ContainerInstanceStatus
pattern $bContainerInstanceStatus_REGISTERING :: ContainerInstanceStatus
$mContainerInstanceStatus_REGISTERING :: forall r.
ContainerInstanceStatus -> (Void# -> r) -> (Void# -> r) -> r
ContainerInstanceStatus_REGISTERING = ContainerInstanceStatus' "REGISTERING"

pattern ContainerInstanceStatus_REGISTRATION_FAILED :: ContainerInstanceStatus
pattern $bContainerInstanceStatus_REGISTRATION_FAILED :: ContainerInstanceStatus
$mContainerInstanceStatus_REGISTRATION_FAILED :: forall r.
ContainerInstanceStatus -> (Void# -> r) -> (Void# -> r) -> r
ContainerInstanceStatus_REGISTRATION_FAILED = ContainerInstanceStatus' "REGISTRATION_FAILED"

{-# COMPLETE
  ContainerInstanceStatus_ACTIVE,
  ContainerInstanceStatus_DEREGISTERING,
  ContainerInstanceStatus_DRAINING,
  ContainerInstanceStatus_REGISTERING,
  ContainerInstanceStatus_REGISTRATION_FAILED,
  ContainerInstanceStatus'
  #-}