{-# 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.Pinpoint.Types.Frequency
-- 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.Pinpoint.Types.Frequency
  ( Frequency
      ( ..,
        Frequency_DAILY,
        Frequency_EVENT,
        Frequency_HOURLY,
        Frequency_IN_APP_EVENT,
        Frequency_MONTHLY,
        Frequency_ONCE,
        Frequency_WEEKLY
      ),
  )
where

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

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

pattern Frequency_DAILY :: Frequency
pattern $bFrequency_DAILY :: Frequency
$mFrequency_DAILY :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_DAILY = Frequency' "DAILY"

pattern Frequency_EVENT :: Frequency
pattern $bFrequency_EVENT :: Frequency
$mFrequency_EVENT :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_EVENT = Frequency' "EVENT"

pattern Frequency_HOURLY :: Frequency
pattern $bFrequency_HOURLY :: Frequency
$mFrequency_HOURLY :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_HOURLY = Frequency' "HOURLY"

pattern Frequency_IN_APP_EVENT :: Frequency
pattern $bFrequency_IN_APP_EVENT :: Frequency
$mFrequency_IN_APP_EVENT :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_IN_APP_EVENT = Frequency' "IN_APP_EVENT"

pattern Frequency_MONTHLY :: Frequency
pattern $bFrequency_MONTHLY :: Frequency
$mFrequency_MONTHLY :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_MONTHLY = Frequency' "MONTHLY"

pattern Frequency_ONCE :: Frequency
pattern $bFrequency_ONCE :: Frequency
$mFrequency_ONCE :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_ONCE = Frequency' "ONCE"

pattern Frequency_WEEKLY :: Frequency
pattern $bFrequency_WEEKLY :: Frequency
$mFrequency_WEEKLY :: forall r. Frequency -> (Void# -> r) -> (Void# -> r) -> r
Frequency_WEEKLY = Frequency' "WEEKLY"

{-# COMPLETE
  Frequency_DAILY,
  Frequency_EVENT,
  Frequency_HOURLY,
  Frequency_IN_APP_EVENT,
  Frequency_MONTHLY,
  Frequency_ONCE,
  Frequency_WEEKLY,
  Frequency'
  #-}