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

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

newtype PackageFormat = PackageFormat'
  { PackageFormat -> Text
fromPackageFormat ::
      Core.Text
  }
  deriving stock
    ( Int -> PackageFormat -> ShowS
[PackageFormat] -> ShowS
PackageFormat -> String
(Int -> PackageFormat -> ShowS)
-> (PackageFormat -> String)
-> ([PackageFormat] -> ShowS)
-> Show PackageFormat
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]
(Int -> ReadS PackageFormat)
-> ReadS [PackageFormat]
-> ReadPrec PackageFormat
-> ReadPrec [PackageFormat]
-> Read 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
(PackageFormat -> PackageFormat -> Bool)
-> (PackageFormat -> PackageFormat -> Bool) -> Eq PackageFormat
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
Eq PackageFormat
-> (PackageFormat -> PackageFormat -> Ordering)
-> (PackageFormat -> PackageFormat -> Bool)
-> (PackageFormat -> PackageFormat -> Bool)
-> (PackageFormat -> PackageFormat -> Bool)
-> (PackageFormat -> PackageFormat -> Bool)
-> (PackageFormat -> PackageFormat -> PackageFormat)
-> (PackageFormat -> PackageFormat -> PackageFormat)
-> Ord 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
$cp1Ord :: Eq PackageFormat
Prelude.Ord,
      (forall x. PackageFormat -> Rep PackageFormat x)
-> (forall x. Rep PackageFormat x -> PackageFormat)
-> Generic PackageFormat
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
    ( Int -> PackageFormat -> Int
PackageFormat -> Int
(Int -> PackageFormat -> Int)
-> (PackageFormat -> Int) -> Hashable PackageFormat
forall 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 -> ()
(PackageFormat -> ()) -> NFData PackageFormat
forall a. (a -> ()) -> NFData a
rnf :: PackageFormat -> ()
$crnf :: PackageFormat -> ()
Prelude.NFData,
      Text -> Either String PackageFormat
(Text -> Either String PackageFormat) -> FromText PackageFormat
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String PackageFormat
$cfromText :: Text -> Either String PackageFormat
Core.FromText,
      PackageFormat -> Text
(PackageFormat -> Text) -> ToText PackageFormat
forall a. (a -> Text) -> ToText a
toText :: PackageFormat -> Text
$ctoText :: PackageFormat -> Text
Core.ToText,
      PackageFormat -> ByteString
(PackageFormat -> ByteString) -> ToByteString PackageFormat
forall a. (a -> ByteString) -> ToByteString a
toBS :: PackageFormat -> ByteString
$ctoBS :: PackageFormat -> ByteString
Core.ToByteString,
      PackageFormat -> ByteStringBuilder
(PackageFormat -> ByteStringBuilder) -> ToLog PackageFormat
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: PackageFormat -> ByteStringBuilder
$cbuild :: PackageFormat -> ByteStringBuilder
Core.ToLog,
      HeaderName -> PackageFormat -> [Header]
(HeaderName -> PackageFormat -> [Header]) -> ToHeader PackageFormat
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> PackageFormat -> [Header]
$ctoHeader :: HeaderName -> PackageFormat -> [Header]
Core.ToHeader,
      PackageFormat -> QueryString
(PackageFormat -> QueryString) -> ToQuery PackageFormat
forall a. (a -> QueryString) -> ToQuery a
toQuery :: PackageFormat -> QueryString
$ctoQuery :: PackageFormat -> QueryString
Core.ToQuery,
      Value -> Parser [PackageFormat]
Value -> Parser PackageFormat
(Value -> Parser PackageFormat)
-> (Value -> Parser [PackageFormat]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [PackageFormat]
FromJSONKeyFunction PackageFormat
FromJSONKeyFunction PackageFormat
-> FromJSONKeyFunction [PackageFormat] -> FromJSONKey PackageFormat
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [PackageFormat]
$cfromJSONKeyList :: FromJSONKeyFunction [PackageFormat]
fromJSONKey :: FromJSONKeyFunction PackageFormat
$cfromJSONKey :: FromJSONKeyFunction PackageFormat
Core.FromJSONKey,
      [PackageFormat] -> Encoding
[PackageFormat] -> Value
PackageFormat -> Encoding
PackageFormat -> Value
(PackageFormat -> Value)
-> (PackageFormat -> Encoding)
-> ([PackageFormat] -> Value)
-> ([PackageFormat] -> Encoding)
-> ToJSON PackageFormat
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
Core.ToJSON,
      ToJSONKeyFunction [PackageFormat]
ToJSONKeyFunction PackageFormat
ToJSONKeyFunction PackageFormat
-> ToJSONKeyFunction [PackageFormat] -> ToJSONKey PackageFormat
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [PackageFormat]
$ctoJSONKeyList :: ToJSONKeyFunction [PackageFormat]
toJSONKey :: ToJSONKeyFunction PackageFormat
$ctoJSONKey :: ToJSONKeyFunction PackageFormat
Core.ToJSONKey,
      [Node] -> Either String PackageFormat
([Node] -> Either String PackageFormat) -> FromXML PackageFormat
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String PackageFormat
$cparseXML :: [Node] -> Either String PackageFormat
Core.FromXML,
      PackageFormat -> XML
(PackageFormat -> XML) -> ToXML PackageFormat
forall a. (a -> XML) -> ToXML a
toXML :: PackageFormat -> XML
$ctoXML :: PackageFormat -> XML
Core.ToXML
    )

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

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

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

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

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