{-# 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.PackageFormat
-- 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.CodeArtifact.Types.PackageFormat
  ( PackageFormat
      ( ..,
        PackageFormat_Maven,
        PackageFormat_Npm,
        PackageFormat_Nuget,
        PackageFormat_Pypi
      ),
  )
where

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

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

pattern PackageFormat_Maven :: PackageFormat
pattern $bPackageFormat_Maven :: PackageFormat
$mPackageFormat_Maven :: forall {r}. PackageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
PackageFormat_Maven = PackageFormat' "maven"

pattern PackageFormat_Npm :: PackageFormat
pattern $bPackageFormat_Npm :: PackageFormat
$mPackageFormat_Npm :: forall {r}. PackageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
PackageFormat_Npm = PackageFormat' "npm"

pattern PackageFormat_Nuget :: PackageFormat
pattern $bPackageFormat_Nuget :: PackageFormat
$mPackageFormat_Nuget :: forall {r}. PackageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
PackageFormat_Nuget = PackageFormat' "nuget"

pattern PackageFormat_Pypi :: PackageFormat
pattern $bPackageFormat_Pypi :: PackageFormat
$mPackageFormat_Pypi :: forall {r}. PackageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
PackageFormat_Pypi = PackageFormat' "pypi"

{-# COMPLETE
  PackageFormat_Maven,
  PackageFormat_Npm,
  PackageFormat_Nuget,
  PackageFormat_Pypi,
  PackageFormat'
  #-}