{-# 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.EC2.Types.AttachmentStatus
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.AttachmentStatus
  ( AttachmentStatus
      ( ..,
        AttachmentStatus_Attached,
        AttachmentStatus_Attaching,
        AttachmentStatus_Available,
        AttachmentStatus_Busy,
        AttachmentStatus_Detached,
        AttachmentStatus_Detaching
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

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

pattern AttachmentStatus_Attached :: AttachmentStatus
pattern $bAttachmentStatus_Attached :: AttachmentStatus
$mAttachmentStatus_Attached :: forall {r}. AttachmentStatus -> ((# #) -> r) -> ((# #) -> r) -> r
AttachmentStatus_Attached = AttachmentStatus' "attached"

pattern AttachmentStatus_Attaching :: AttachmentStatus
pattern $bAttachmentStatus_Attaching :: AttachmentStatus
$mAttachmentStatus_Attaching :: forall {r}. AttachmentStatus -> ((# #) -> r) -> ((# #) -> r) -> r
AttachmentStatus_Attaching = AttachmentStatus' "attaching"

pattern AttachmentStatus_Available :: AttachmentStatus
pattern $bAttachmentStatus_Available :: AttachmentStatus
$mAttachmentStatus_Available :: forall {r}. AttachmentStatus -> ((# #) -> r) -> ((# #) -> r) -> r
AttachmentStatus_Available = AttachmentStatus' "available"

pattern AttachmentStatus_Busy :: AttachmentStatus
pattern $bAttachmentStatus_Busy :: AttachmentStatus
$mAttachmentStatus_Busy :: forall {r}. AttachmentStatus -> ((# #) -> r) -> ((# #) -> r) -> r
AttachmentStatus_Busy = AttachmentStatus' "busy"

pattern AttachmentStatus_Detached :: AttachmentStatus
pattern $bAttachmentStatus_Detached :: AttachmentStatus
$mAttachmentStatus_Detached :: forall {r}. AttachmentStatus -> ((# #) -> r) -> ((# #) -> r) -> r
AttachmentStatus_Detached = AttachmentStatus' "detached"

pattern AttachmentStatus_Detaching :: AttachmentStatus
pattern $bAttachmentStatus_Detaching :: AttachmentStatus
$mAttachmentStatus_Detaching :: forall {r}. AttachmentStatus -> ((# #) -> r) -> ((# #) -> r) -> r
AttachmentStatus_Detaching = AttachmentStatus' "detaching"

{-# COMPLETE
  AttachmentStatus_Attached,
  AttachmentStatus_Attaching,
  AttachmentStatus_Available,
  AttachmentStatus_Busy,
  AttachmentStatus_Detached,
  AttachmentStatus_Detaching,
  AttachmentStatus'
  #-}