{-# 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.ConnectionErrorCodeType
-- 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.KMS.Types.ConnectionErrorCodeType
  ( ConnectionErrorCodeType
      ( ..,
        ConnectionErrorCodeType_CLUSTER_NOT_FOUND,
        ConnectionErrorCodeType_INSUFFICIENT_CLOUDHSM_HSMS,
        ConnectionErrorCodeType_INTERNAL_ERROR,
        ConnectionErrorCodeType_INVALID_CREDENTIALS,
        ConnectionErrorCodeType_NETWORK_ERRORS,
        ConnectionErrorCodeType_SUBNET_NOT_FOUND,
        ConnectionErrorCodeType_USER_LOCKED_OUT,
        ConnectionErrorCodeType_USER_LOGGED_IN,
        ConnectionErrorCodeType_USER_NOT_FOUND
      ),
  )
where

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

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

pattern ConnectionErrorCodeType_CLUSTER_NOT_FOUND :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_CLUSTER_NOT_FOUND :: ConnectionErrorCodeType
$mConnectionErrorCodeType_CLUSTER_NOT_FOUND :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_CLUSTER_NOT_FOUND = ConnectionErrorCodeType' "CLUSTER_NOT_FOUND"

pattern ConnectionErrorCodeType_INSUFFICIENT_CLOUDHSM_HSMS :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_INSUFFICIENT_CLOUDHSM_HSMS :: ConnectionErrorCodeType
$mConnectionErrorCodeType_INSUFFICIENT_CLOUDHSM_HSMS :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_INSUFFICIENT_CLOUDHSM_HSMS = ConnectionErrorCodeType' "INSUFFICIENT_CLOUDHSM_HSMS"

pattern ConnectionErrorCodeType_INTERNAL_ERROR :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_INTERNAL_ERROR :: ConnectionErrorCodeType
$mConnectionErrorCodeType_INTERNAL_ERROR :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_INTERNAL_ERROR = ConnectionErrorCodeType' "INTERNAL_ERROR"

pattern ConnectionErrorCodeType_INVALID_CREDENTIALS :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_INVALID_CREDENTIALS :: ConnectionErrorCodeType
$mConnectionErrorCodeType_INVALID_CREDENTIALS :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_INVALID_CREDENTIALS = ConnectionErrorCodeType' "INVALID_CREDENTIALS"

pattern ConnectionErrorCodeType_NETWORK_ERRORS :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_NETWORK_ERRORS :: ConnectionErrorCodeType
$mConnectionErrorCodeType_NETWORK_ERRORS :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_NETWORK_ERRORS = ConnectionErrorCodeType' "NETWORK_ERRORS"

pattern ConnectionErrorCodeType_SUBNET_NOT_FOUND :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_SUBNET_NOT_FOUND :: ConnectionErrorCodeType
$mConnectionErrorCodeType_SUBNET_NOT_FOUND :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_SUBNET_NOT_FOUND = ConnectionErrorCodeType' "SUBNET_NOT_FOUND"

pattern ConnectionErrorCodeType_USER_LOCKED_OUT :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_USER_LOCKED_OUT :: ConnectionErrorCodeType
$mConnectionErrorCodeType_USER_LOCKED_OUT :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_USER_LOCKED_OUT = ConnectionErrorCodeType' "USER_LOCKED_OUT"

pattern ConnectionErrorCodeType_USER_LOGGED_IN :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_USER_LOGGED_IN :: ConnectionErrorCodeType
$mConnectionErrorCodeType_USER_LOGGED_IN :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_USER_LOGGED_IN = ConnectionErrorCodeType' "USER_LOGGED_IN"

pattern ConnectionErrorCodeType_USER_NOT_FOUND :: ConnectionErrorCodeType
pattern $bConnectionErrorCodeType_USER_NOT_FOUND :: ConnectionErrorCodeType
$mConnectionErrorCodeType_USER_NOT_FOUND :: forall r.
ConnectionErrorCodeType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionErrorCodeType_USER_NOT_FOUND = ConnectionErrorCodeType' "USER_NOT_FOUND"

{-# COMPLETE
  ConnectionErrorCodeType_CLUSTER_NOT_FOUND,
  ConnectionErrorCodeType_INSUFFICIENT_CLOUDHSM_HSMS,
  ConnectionErrorCodeType_INTERNAL_ERROR,
  ConnectionErrorCodeType_INVALID_CREDENTIALS,
  ConnectionErrorCodeType_NETWORK_ERRORS,
  ConnectionErrorCodeType_SUBNET_NOT_FOUND,
  ConnectionErrorCodeType_USER_LOCKED_OUT,
  ConnectionErrorCodeType_USER_LOGGED_IN,
  ConnectionErrorCodeType_USER_NOT_FOUND,
  ConnectionErrorCodeType'
  #-}