{-# 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.Lightsail.Types.DiskState
-- 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.Lightsail.Types.DiskState
  ( DiskState
      ( ..,
        DiskState_Available,
        DiskState_Error,
        DiskState_In_use,
        DiskState_Pending,
        DiskState_Unknown
      ),
  )
where

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

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

pattern DiskState_Available :: DiskState
pattern $bDiskState_Available :: DiskState
$mDiskState_Available :: forall r. DiskState -> (Void# -> r) -> (Void# -> r) -> r
DiskState_Available = DiskState' "available"

pattern DiskState_Error :: DiskState
pattern $bDiskState_Error :: DiskState
$mDiskState_Error :: forall r. DiskState -> (Void# -> r) -> (Void# -> r) -> r
DiskState_Error = DiskState' "error"

pattern DiskState_In_use :: DiskState
pattern $bDiskState_In_use :: DiskState
$mDiskState_In_use :: forall r. DiskState -> (Void# -> r) -> (Void# -> r) -> r
DiskState_In_use = DiskState' "in-use"

pattern DiskState_Pending :: DiskState
pattern $bDiskState_Pending :: DiskState
$mDiskState_Pending :: forall r. DiskState -> (Void# -> r) -> (Void# -> r) -> r
DiskState_Pending = DiskState' "pending"

pattern DiskState_Unknown :: DiskState
pattern $bDiskState_Unknown :: DiskState
$mDiskState_Unknown :: forall r. DiskState -> (Void# -> r) -> (Void# -> r) -> r
DiskState_Unknown = DiskState' "unknown"

{-# COMPLETE
  DiskState_Available,
  DiskState_Error,
  DiskState_In_use,
  DiskState_Pending,
  DiskState_Unknown,
  DiskState'
  #-}