{-# 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.SecurityHub.Types.Partition
-- 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.SecurityHub.Types.Partition
  ( Partition
      ( ..,
        Partition_Aws,
        Partition_Aws_cn,
        Partition_Aws_us_gov
      ),
  )
where

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

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

pattern Partition_Aws :: Partition
pattern $bPartition_Aws :: Partition
$mPartition_Aws :: forall r. Partition -> (Void# -> r) -> (Void# -> r) -> r
Partition_Aws = Partition' "aws"

pattern Partition_Aws_cn :: Partition
pattern $bPartition_Aws_cn :: Partition
$mPartition_Aws_cn :: forall r. Partition -> (Void# -> r) -> (Void# -> r) -> r
Partition_Aws_cn = Partition' "aws-cn"

pattern Partition_Aws_us_gov :: Partition
pattern $bPartition_Aws_us_gov :: Partition
$mPartition_Aws_us_gov :: forall r. Partition -> (Void# -> r) -> (Void# -> r) -> r
Partition_Aws_us_gov = Partition' "aws-us-gov"

{-# COMPLETE
  Partition_Aws,
  Partition_Aws_cn,
  Partition_Aws_us_gov,
  Partition'
  #-}