{-# 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.CodeArtifact.Types.PackageVersionErrorCode
-- 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.CodeArtifact.Types.PackageVersionErrorCode
  ( PackageVersionErrorCode
      ( ..,
        PackageVersionErrorCode_ALREADY_EXISTS,
        PackageVersionErrorCode_MISMATCHED_REVISION,
        PackageVersionErrorCode_MISMATCHED_STATUS,
        PackageVersionErrorCode_NOT_ALLOWED,
        PackageVersionErrorCode_NOT_FOUND,
        PackageVersionErrorCode_SKIPPED
      ),
  )
where

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

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

pattern PackageVersionErrorCode_ALREADY_EXISTS :: PackageVersionErrorCode
pattern $bPackageVersionErrorCode_ALREADY_EXISTS :: PackageVersionErrorCode
$mPackageVersionErrorCode_ALREADY_EXISTS :: forall r.
PackageVersionErrorCode -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionErrorCode_ALREADY_EXISTS = PackageVersionErrorCode' "ALREADY_EXISTS"

pattern PackageVersionErrorCode_MISMATCHED_REVISION :: PackageVersionErrorCode
pattern $bPackageVersionErrorCode_MISMATCHED_REVISION :: PackageVersionErrorCode
$mPackageVersionErrorCode_MISMATCHED_REVISION :: forall r.
PackageVersionErrorCode -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionErrorCode_MISMATCHED_REVISION = PackageVersionErrorCode' "MISMATCHED_REVISION"

pattern PackageVersionErrorCode_MISMATCHED_STATUS :: PackageVersionErrorCode
pattern $bPackageVersionErrorCode_MISMATCHED_STATUS :: PackageVersionErrorCode
$mPackageVersionErrorCode_MISMATCHED_STATUS :: forall r.
PackageVersionErrorCode -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionErrorCode_MISMATCHED_STATUS = PackageVersionErrorCode' "MISMATCHED_STATUS"

pattern PackageVersionErrorCode_NOT_ALLOWED :: PackageVersionErrorCode
pattern $bPackageVersionErrorCode_NOT_ALLOWED :: PackageVersionErrorCode
$mPackageVersionErrorCode_NOT_ALLOWED :: forall r.
PackageVersionErrorCode -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionErrorCode_NOT_ALLOWED = PackageVersionErrorCode' "NOT_ALLOWED"

pattern PackageVersionErrorCode_NOT_FOUND :: PackageVersionErrorCode
pattern $bPackageVersionErrorCode_NOT_FOUND :: PackageVersionErrorCode
$mPackageVersionErrorCode_NOT_FOUND :: forall r.
PackageVersionErrorCode -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionErrorCode_NOT_FOUND = PackageVersionErrorCode' "NOT_FOUND"

pattern PackageVersionErrorCode_SKIPPED :: PackageVersionErrorCode
pattern $bPackageVersionErrorCode_SKIPPED :: PackageVersionErrorCode
$mPackageVersionErrorCode_SKIPPED :: forall r.
PackageVersionErrorCode -> (Void# -> r) -> (Void# -> r) -> r
PackageVersionErrorCode_SKIPPED = PackageVersionErrorCode' "SKIPPED"

{-# COMPLETE
  PackageVersionErrorCode_ALREADY_EXISTS,
  PackageVersionErrorCode_MISMATCHED_REVISION,
  PackageVersionErrorCode_MISMATCHED_STATUS,
  PackageVersionErrorCode_NOT_ALLOWED,
  PackageVersionErrorCode_NOT_FOUND,
  PackageVersionErrorCode_SKIPPED,
  PackageVersionErrorCode'
  #-}