{-# 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.CloudDirectory.Types.RuleType
-- 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.CloudDirectory.Types.RuleType
  ( RuleType
      ( ..,
        RuleType_BINARY_LENGTH,
        RuleType_NUMBER_COMPARISON,
        RuleType_STRING_FROM_SET,
        RuleType_STRING_LENGTH
      ),
  )
where

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

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

pattern RuleType_BINARY_LENGTH :: RuleType
pattern $bRuleType_BINARY_LENGTH :: RuleType
$mRuleType_BINARY_LENGTH :: forall r. RuleType -> (Void# -> r) -> (Void# -> r) -> r
RuleType_BINARY_LENGTH = RuleType' "BINARY_LENGTH"

pattern RuleType_NUMBER_COMPARISON :: RuleType
pattern $bRuleType_NUMBER_COMPARISON :: RuleType
$mRuleType_NUMBER_COMPARISON :: forall r. RuleType -> (Void# -> r) -> (Void# -> r) -> r
RuleType_NUMBER_COMPARISON = RuleType' "NUMBER_COMPARISON"

pattern RuleType_STRING_FROM_SET :: RuleType
pattern $bRuleType_STRING_FROM_SET :: RuleType
$mRuleType_STRING_FROM_SET :: forall r. RuleType -> (Void# -> r) -> (Void# -> r) -> r
RuleType_STRING_FROM_SET = RuleType' "STRING_FROM_SET"

pattern RuleType_STRING_LENGTH :: RuleType
pattern $bRuleType_STRING_LENGTH :: RuleType
$mRuleType_STRING_LENGTH :: forall r. RuleType -> (Void# -> r) -> (Void# -> r) -> r
RuleType_STRING_LENGTH = RuleType' "STRING_LENGTH"

{-# COMPLETE
  RuleType_BINARY_LENGTH,
  RuleType_NUMBER_COMPARISON,
  RuleType_STRING_FROM_SET,
  RuleType_STRING_LENGTH,
  RuleType'
  #-}