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

pattern VolumeAttachmentState_Attached :: VolumeAttachmentState
pattern $bVolumeAttachmentState_Attached :: VolumeAttachmentState
$mVolumeAttachmentState_Attached :: forall {r}.
VolumeAttachmentState -> ((# #) -> r) -> ((# #) -> r) -> r
VolumeAttachmentState_Attached = VolumeAttachmentState' "attached"

pattern VolumeAttachmentState_Attaching :: VolumeAttachmentState
pattern $bVolumeAttachmentState_Attaching :: VolumeAttachmentState
$mVolumeAttachmentState_Attaching :: forall {r}.
VolumeAttachmentState -> ((# #) -> r) -> ((# #) -> r) -> r
VolumeAttachmentState_Attaching = VolumeAttachmentState' "attaching"

pattern VolumeAttachmentState_Busy :: VolumeAttachmentState
pattern $bVolumeAttachmentState_Busy :: VolumeAttachmentState
$mVolumeAttachmentState_Busy :: forall {r}.
VolumeAttachmentState -> ((# #) -> r) -> ((# #) -> r) -> r
VolumeAttachmentState_Busy = VolumeAttachmentState' "busy"

pattern VolumeAttachmentState_Detached :: VolumeAttachmentState
pattern $bVolumeAttachmentState_Detached :: VolumeAttachmentState
$mVolumeAttachmentState_Detached :: forall {r}.
VolumeAttachmentState -> ((# #) -> r) -> ((# #) -> r) -> r
VolumeAttachmentState_Detached = VolumeAttachmentState' "detached"

pattern VolumeAttachmentState_Detaching :: VolumeAttachmentState
pattern $bVolumeAttachmentState_Detaching :: VolumeAttachmentState
$mVolumeAttachmentState_Detaching :: forall {r}.
VolumeAttachmentState -> ((# #) -> r) -> ((# #) -> r) -> r
VolumeAttachmentState_Detaching = VolumeAttachmentState' "detaching"

{-# COMPLETE
  VolumeAttachmentState_Attached,
  VolumeAttachmentState_Attaching,
  VolumeAttachmentState_Busy,
  VolumeAttachmentState_Detached,
  VolumeAttachmentState_Detaching,
  VolumeAttachmentState'
  #-}