{-# 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.EC2.Types.PeriodType
-- 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.EC2.Types.PeriodType
  ( PeriodType
      ( ..,
        PeriodType_Fifteen_minutes,
        PeriodType_Five_minutes,
        PeriodType_One_day,
        PeriodType_One_hour,
        PeriodType_One_week,
        PeriodType_Three_hours
      ),
  )
where

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

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

pattern PeriodType_Fifteen_minutes :: PeriodType
pattern $bPeriodType_Fifteen_minutes :: PeriodType
$mPeriodType_Fifteen_minutes :: forall {r}. PeriodType -> ((# #) -> r) -> ((# #) -> r) -> r
PeriodType_Fifteen_minutes = PeriodType' "fifteen-minutes"

pattern PeriodType_Five_minutes :: PeriodType
pattern $bPeriodType_Five_minutes :: PeriodType
$mPeriodType_Five_minutes :: forall {r}. PeriodType -> ((# #) -> r) -> ((# #) -> r) -> r
PeriodType_Five_minutes = PeriodType' "five-minutes"

pattern PeriodType_One_day :: PeriodType
pattern $bPeriodType_One_day :: PeriodType
$mPeriodType_One_day :: forall {r}. PeriodType -> ((# #) -> r) -> ((# #) -> r) -> r
PeriodType_One_day = PeriodType' "one-day"

pattern PeriodType_One_hour :: PeriodType
pattern $bPeriodType_One_hour :: PeriodType
$mPeriodType_One_hour :: forall {r}. PeriodType -> ((# #) -> r) -> ((# #) -> r) -> r
PeriodType_One_hour = PeriodType' "one-hour"

pattern PeriodType_One_week :: PeriodType
pattern $bPeriodType_One_week :: PeriodType
$mPeriodType_One_week :: forall {r}. PeriodType -> ((# #) -> r) -> ((# #) -> r) -> r
PeriodType_One_week = PeriodType' "one-week"

pattern PeriodType_Three_hours :: PeriodType
pattern $bPeriodType_Three_hours :: PeriodType
$mPeriodType_Three_hours :: forall {r}. PeriodType -> ((# #) -> r) -> ((# #) -> r) -> r
PeriodType_Three_hours = PeriodType' "three-hours"

{-# COMPLETE
  PeriodType_Fifteen_minutes,
  PeriodType_Five_minutes,
  PeriodType_One_day,
  PeriodType_One_hour,
  PeriodType_One_week,
  PeriodType_Three_hours,
  PeriodType'
  #-}