{-# 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.LoadBalancerState
-- 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.LoadBalancerState
  ( LoadBalancerState
      ( ..,
        LoadBalancerState_Active,
        LoadBalancerState_Active_impaired,
        LoadBalancerState_Failed,
        LoadBalancerState_Provisioning,
        LoadBalancerState_Unknown
      ),
  )
where

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

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

pattern LoadBalancerState_Active :: LoadBalancerState
pattern $bLoadBalancerState_Active :: LoadBalancerState
$mLoadBalancerState_Active :: forall r. LoadBalancerState -> (Void# -> r) -> (Void# -> r) -> r
LoadBalancerState_Active = LoadBalancerState' "active"

pattern LoadBalancerState_Active_impaired :: LoadBalancerState
pattern $bLoadBalancerState_Active_impaired :: LoadBalancerState
$mLoadBalancerState_Active_impaired :: forall r. LoadBalancerState -> (Void# -> r) -> (Void# -> r) -> r
LoadBalancerState_Active_impaired = LoadBalancerState' "active_impaired"

pattern LoadBalancerState_Failed :: LoadBalancerState
pattern $bLoadBalancerState_Failed :: LoadBalancerState
$mLoadBalancerState_Failed :: forall r. LoadBalancerState -> (Void# -> r) -> (Void# -> r) -> r
LoadBalancerState_Failed = LoadBalancerState' "failed"

pattern LoadBalancerState_Provisioning :: LoadBalancerState
pattern $bLoadBalancerState_Provisioning :: LoadBalancerState
$mLoadBalancerState_Provisioning :: forall r. LoadBalancerState -> (Void# -> r) -> (Void# -> r) -> r
LoadBalancerState_Provisioning = LoadBalancerState' "provisioning"

pattern LoadBalancerState_Unknown :: LoadBalancerState
pattern $bLoadBalancerState_Unknown :: LoadBalancerState
$mLoadBalancerState_Unknown :: forall r. LoadBalancerState -> (Void# -> r) -> (Void# -> r) -> r
LoadBalancerState_Unknown = LoadBalancerState' "unknown"

{-# COMPLETE
  LoadBalancerState_Active,
  LoadBalancerState_Active_impaired,
  LoadBalancerState_Failed,
  LoadBalancerState_Provisioning,
  LoadBalancerState_Unknown,
  LoadBalancerState'
  #-}