{-# 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.AllowPublish
-- 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.AllowPublish
  ( AllowPublish
      ( ..,
        AllowPublish_ALLOW,
        AllowPublish_BLOCK
      ),
  )
where

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

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

pattern AllowPublish_ALLOW :: AllowPublish
pattern $bAllowPublish_ALLOW :: AllowPublish
$mAllowPublish_ALLOW :: forall {r}. AllowPublish -> ((# #) -> r) -> ((# #) -> r) -> r
AllowPublish_ALLOW = AllowPublish' "ALLOW"

pattern AllowPublish_BLOCK :: AllowPublish
pattern $bAllowPublish_BLOCK :: AllowPublish
$mAllowPublish_BLOCK :: forall {r}. AllowPublish -> ((# #) -> r) -> ((# #) -> r) -> r
AllowPublish_BLOCK = AllowPublish' "BLOCK"

{-# COMPLETE
  AllowPublish_ALLOW,
  AllowPublish_BLOCK,
  AllowPublish'
  #-}