{-# 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.WorkDocs.Types.SubscriptionType
-- 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.WorkDocs.Types.SubscriptionType
  ( SubscriptionType
      ( ..,
        SubscriptionType_ALL
      ),
  )
where

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

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

pattern SubscriptionType_ALL :: SubscriptionType
pattern $bSubscriptionType_ALL :: SubscriptionType
$mSubscriptionType_ALL :: forall r. SubscriptionType -> (Void# -> r) -> (Void# -> r) -> r
SubscriptionType_ALL = SubscriptionType' "ALL"

{-# COMPLETE
  SubscriptionType_ALL,
  SubscriptionType'
  #-}