{-# 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.WellArchitected.Types.PermissionType
-- 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.WellArchitected.Types.PermissionType
  ( PermissionType
      ( ..,
        PermissionType_CONTRIBUTOR,
        PermissionType_READONLY
      ),
  )
where

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

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

pattern PermissionType_CONTRIBUTOR :: PermissionType
pattern $bPermissionType_CONTRIBUTOR :: PermissionType
$mPermissionType_CONTRIBUTOR :: forall r. PermissionType -> (Void# -> r) -> (Void# -> r) -> r
PermissionType_CONTRIBUTOR = PermissionType' "CONTRIBUTOR"

pattern PermissionType_READONLY :: PermissionType
pattern $bPermissionType_READONLY :: PermissionType
$mPermissionType_READONLY :: forall r. PermissionType -> (Void# -> r) -> (Void# -> r) -> r
PermissionType_READONLY = PermissionType' "READONLY"

{-# COMPLETE
  PermissionType_CONTRIBUTOR,
  PermissionType_READONLY,
  PermissionType'
  #-}