{-# 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.DataExchange.Types.Code
-- 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.DataExchange.Types.Code
  ( Code
      ( ..,
        Code_ACCESS_DENIED_EXCEPTION,
        Code_INTERNAL_SERVER_EXCEPTION,
        Code_MALWARE_DETECTED,
        Code_MALWARE_SCAN_ENCRYPTED_FILE,
        Code_RESOURCE_NOT_FOUND_EXCEPTION,
        Code_SERVICE_QUOTA_EXCEEDED_EXCEPTION,
        Code_VALIDATION_EXCEPTION
      ),
  )
where

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

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

pattern Code_ACCESS_DENIED_EXCEPTION :: Code
pattern $bCode_ACCESS_DENIED_EXCEPTION :: Code
$mCode_ACCESS_DENIED_EXCEPTION :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_ACCESS_DENIED_EXCEPTION = Code' "ACCESS_DENIED_EXCEPTION"

pattern Code_INTERNAL_SERVER_EXCEPTION :: Code
pattern $bCode_INTERNAL_SERVER_EXCEPTION :: Code
$mCode_INTERNAL_SERVER_EXCEPTION :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_INTERNAL_SERVER_EXCEPTION = Code' "INTERNAL_SERVER_EXCEPTION"

pattern Code_MALWARE_DETECTED :: Code
pattern $bCode_MALWARE_DETECTED :: Code
$mCode_MALWARE_DETECTED :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_MALWARE_DETECTED = Code' "MALWARE_DETECTED"

pattern Code_MALWARE_SCAN_ENCRYPTED_FILE :: Code
pattern $bCode_MALWARE_SCAN_ENCRYPTED_FILE :: Code
$mCode_MALWARE_SCAN_ENCRYPTED_FILE :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_MALWARE_SCAN_ENCRYPTED_FILE = Code' "MALWARE_SCAN_ENCRYPTED_FILE"

pattern Code_RESOURCE_NOT_FOUND_EXCEPTION :: Code
pattern $bCode_RESOURCE_NOT_FOUND_EXCEPTION :: Code
$mCode_RESOURCE_NOT_FOUND_EXCEPTION :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_RESOURCE_NOT_FOUND_EXCEPTION = Code' "RESOURCE_NOT_FOUND_EXCEPTION"

pattern Code_SERVICE_QUOTA_EXCEEDED_EXCEPTION :: Code
pattern $bCode_SERVICE_QUOTA_EXCEEDED_EXCEPTION :: Code
$mCode_SERVICE_QUOTA_EXCEEDED_EXCEPTION :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_SERVICE_QUOTA_EXCEEDED_EXCEPTION = Code' "SERVICE_QUOTA_EXCEEDED_EXCEPTION"

pattern Code_VALIDATION_EXCEPTION :: Code
pattern $bCode_VALIDATION_EXCEPTION :: Code
$mCode_VALIDATION_EXCEPTION :: forall r. Code -> (Void# -> r) -> (Void# -> r) -> r
Code_VALIDATION_EXCEPTION = Code' "VALIDATION_EXCEPTION"

{-# COMPLETE
  Code_ACCESS_DENIED_EXCEPTION,
  Code_INTERNAL_SERVER_EXCEPTION,
  Code_MALWARE_DETECTED,
  Code_MALWARE_SCAN_ENCRYPTED_FILE,
  Code_RESOURCE_NOT_FOUND_EXCEPTION,
  Code_SERVICE_QUOTA_EXCEEDED_EXCEPTION,
  Code_VALIDATION_EXCEPTION,
  Code'
  #-}