{-# 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.AllowUpstream
-- 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.AllowUpstream
  ( AllowUpstream
      ( ..,
        AllowUpstream_ALLOW,
        AllowUpstream_BLOCK
      ),
  )
where

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

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

pattern AllowUpstream_ALLOW :: AllowUpstream
pattern $bAllowUpstream_ALLOW :: AllowUpstream
$mAllowUpstream_ALLOW :: forall {r}. AllowUpstream -> ((# #) -> r) -> ((# #) -> r) -> r
AllowUpstream_ALLOW = AllowUpstream' "ALLOW"

pattern AllowUpstream_BLOCK :: AllowUpstream
pattern $bAllowUpstream_BLOCK :: AllowUpstream
$mAllowUpstream_BLOCK :: forall {r}. AllowUpstream -> ((# #) -> r) -> ((# #) -> r) -> r
AllowUpstream_BLOCK = AllowUpstream' "BLOCK"

{-# COMPLETE
  AllowUpstream_ALLOW,
  AllowUpstream_BLOCK,
  AllowUpstream'
  #-}