{-# 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.DirectoryService.Types.SelectiveAuth
-- 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.DirectoryService.Types.SelectiveAuth
  ( SelectiveAuth
      ( ..,
        SelectiveAuth_Disabled,
        SelectiveAuth_Enabled
      ),
  )
where

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

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

pattern SelectiveAuth_Disabled :: SelectiveAuth
pattern $bSelectiveAuth_Disabled :: SelectiveAuth
$mSelectiveAuth_Disabled :: forall r. SelectiveAuth -> (Void# -> r) -> (Void# -> r) -> r
SelectiveAuth_Disabled = SelectiveAuth' "Disabled"

pattern SelectiveAuth_Enabled :: SelectiveAuth
pattern $bSelectiveAuth_Enabled :: SelectiveAuth
$mSelectiveAuth_Enabled :: forall r. SelectiveAuth -> (Void# -> r) -> (Void# -> r) -> r
SelectiveAuth_Enabled = SelectiveAuth' "Enabled"

{-# COMPLETE
  SelectiveAuth_Disabled,
  SelectiveAuth_Enabled,
  SelectiveAuth'
  #-}