{-# 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.Grafana.Types.AccountAccessType
-- 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.Grafana.Types.AccountAccessType
  ( AccountAccessType
      ( ..,
        AccountAccessType_CURRENT_ACCOUNT,
        AccountAccessType_ORGANIZATION
      ),
  )
where

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

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

pattern AccountAccessType_CURRENT_ACCOUNT :: AccountAccessType
pattern $bAccountAccessType_CURRENT_ACCOUNT :: AccountAccessType
$mAccountAccessType_CURRENT_ACCOUNT :: forall r. AccountAccessType -> (Void# -> r) -> (Void# -> r) -> r
AccountAccessType_CURRENT_ACCOUNT = AccountAccessType' "CURRENT_ACCOUNT"

pattern AccountAccessType_ORGANIZATION :: AccountAccessType
pattern $bAccountAccessType_ORGANIZATION :: AccountAccessType
$mAccountAccessType_ORGANIZATION :: forall r. AccountAccessType -> (Void# -> r) -> (Void# -> r) -> r
AccountAccessType_ORGANIZATION = AccountAccessType' "ORGANIZATION"

{-# COMPLETE
  AccountAccessType_CURRENT_ACCOUNT,
  AccountAccessType_ORGANIZATION,
  AccountAccessType'
  #-}