{-# 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.Translate.Types.Formality
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Translate.Types.Formality
  ( Formality
      ( ..,
        Formality_FORMAL,
        Formality_INFORMAL
      ),
  )
where

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

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

pattern Formality_FORMAL :: Formality
pattern $bFormality_FORMAL :: Formality
$mFormality_FORMAL :: forall {r}. Formality -> ((# #) -> r) -> ((# #) -> r) -> r
Formality_FORMAL = Formality' "FORMAL"

pattern Formality_INFORMAL :: Formality
pattern $bFormality_INFORMAL :: Formality
$mFormality_INFORMAL :: forall {r}. Formality -> ((# #) -> r) -> ((# #) -> r) -> r
Formality_INFORMAL = Formality' "INFORMAL"

{-# COMPLETE
  Formality_FORMAL,
  Formality_INFORMAL,
  Formality'
  #-}