{-# 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.CloudFront.Types.PriceClass
-- 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.CloudFront.Types.PriceClass
  ( PriceClass
      ( ..,
        PriceClass_PriceClass_100,
        PriceClass_PriceClass_200,
        PriceClass_PriceClass_All
      ),
  )
where

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

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

pattern PriceClass_PriceClass_100 :: PriceClass
pattern $bPriceClass_PriceClass_100 :: PriceClass
$mPriceClass_PriceClass_100 :: forall r. PriceClass -> (Void# -> r) -> (Void# -> r) -> r
PriceClass_PriceClass_100 = PriceClass' "PriceClass_100"

pattern PriceClass_PriceClass_200 :: PriceClass
pattern $bPriceClass_PriceClass_200 :: PriceClass
$mPriceClass_PriceClass_200 :: forall r. PriceClass -> (Void# -> r) -> (Void# -> r) -> r
PriceClass_PriceClass_200 = PriceClass' "PriceClass_200"

pattern PriceClass_PriceClass_All :: PriceClass
pattern $bPriceClass_PriceClass_All :: PriceClass
$mPriceClass_PriceClass_All :: forall r. PriceClass -> (Void# -> r) -> (Void# -> r) -> r
PriceClass_PriceClass_All = PriceClass' "PriceClass_All"

{-# COMPLETE
  PriceClass_PriceClass_100,
  PriceClass_PriceClass_200,
  PriceClass_PriceClass_All,
  PriceClass'
  #-}