{-# 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.KMS.Types.ConnectionStateType
-- 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.KMS.Types.ConnectionStateType
  ( ConnectionStateType
      ( ..,
        ConnectionStateType_CONNECTED,
        ConnectionStateType_CONNECTING,
        ConnectionStateType_DISCONNECTED,
        ConnectionStateType_DISCONNECTING,
        ConnectionStateType_FAILED
      ),
  )
where

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

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

pattern ConnectionStateType_CONNECTED :: ConnectionStateType
pattern $bConnectionStateType_CONNECTED :: ConnectionStateType
$mConnectionStateType_CONNECTED :: forall {r}.
ConnectionStateType -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionStateType_CONNECTED = ConnectionStateType' "CONNECTED"

pattern ConnectionStateType_CONNECTING :: ConnectionStateType
pattern $bConnectionStateType_CONNECTING :: ConnectionStateType
$mConnectionStateType_CONNECTING :: forall {r}.
ConnectionStateType -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionStateType_CONNECTING = ConnectionStateType' "CONNECTING"

pattern ConnectionStateType_DISCONNECTED :: ConnectionStateType
pattern $bConnectionStateType_DISCONNECTED :: ConnectionStateType
$mConnectionStateType_DISCONNECTED :: forall {r}.
ConnectionStateType -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionStateType_DISCONNECTED = ConnectionStateType' "DISCONNECTED"

pattern ConnectionStateType_DISCONNECTING :: ConnectionStateType
pattern $bConnectionStateType_DISCONNECTING :: ConnectionStateType
$mConnectionStateType_DISCONNECTING :: forall {r}.
ConnectionStateType -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionStateType_DISCONNECTING = ConnectionStateType' "DISCONNECTING"

pattern ConnectionStateType_FAILED :: ConnectionStateType
pattern $bConnectionStateType_FAILED :: ConnectionStateType
$mConnectionStateType_FAILED :: forall {r}.
ConnectionStateType -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionStateType_FAILED = ConnectionStateType' "FAILED"

{-# COMPLETE
  ConnectionStateType_CONNECTED,
  ConnectionStateType_CONNECTING,
  ConnectionStateType_DISCONNECTED,
  ConnectionStateType_DISCONNECTING,
  ConnectionStateType_FAILED,
  ConnectionStateType'
  #-}