{-# 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.DeviceFarm.Types.BillingMethod
-- 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.DeviceFarm.Types.BillingMethod
  ( BillingMethod
      ( ..,
        BillingMethod_METERED,
        BillingMethod_UNMETERED
      ),
  )
where

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

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

pattern BillingMethod_METERED :: BillingMethod
pattern $bBillingMethod_METERED :: BillingMethod
$mBillingMethod_METERED :: forall r. BillingMethod -> (Void# -> r) -> (Void# -> r) -> r
BillingMethod_METERED = BillingMethod' "METERED"

pattern BillingMethod_UNMETERED :: BillingMethod
pattern $bBillingMethod_UNMETERED :: BillingMethod
$mBillingMethod_UNMETERED :: forall r. BillingMethod -> (Void# -> r) -> (Void# -> r) -> r
BillingMethod_UNMETERED = BillingMethod' "UNMETERED"

{-# COMPLETE
  BillingMethod_METERED,
  BillingMethod_UNMETERED,
  BillingMethod'
  #-}