{-# 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.RegionType
-- 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.RegionType
  ( RegionType
      ( ..,
        RegionType_Additional,
        RegionType_Primary
      ),
  )
where

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

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

pattern RegionType_Additional :: RegionType
pattern $bRegionType_Additional :: RegionType
$mRegionType_Additional :: forall r. RegionType -> (Void# -> r) -> (Void# -> r) -> r
RegionType_Additional = RegionType' "Additional"

pattern RegionType_Primary :: RegionType
pattern $bRegionType_Primary :: RegionType
$mRegionType_Primary :: forall r. RegionType -> (Void# -> r) -> (Void# -> r) -> r
RegionType_Primary = RegionType' "Primary"

{-# COMPLETE
  RegionType_Additional,
  RegionType_Primary,
  RegionType'
  #-}