{-# 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.LicenseManager.Types.LicenseCountingType
-- 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.LicenseManager.Types.LicenseCountingType
  ( LicenseCountingType
      ( ..,
        LicenseCountingType_Core,
        LicenseCountingType_Instance,
        LicenseCountingType_Socket,
        LicenseCountingType_VCPU
      ),
  )
where

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

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

pattern LicenseCountingType_Core :: LicenseCountingType
pattern $bLicenseCountingType_Core :: LicenseCountingType
$mLicenseCountingType_Core :: forall r. LicenseCountingType -> (Void# -> r) -> (Void# -> r) -> r
LicenseCountingType_Core = LicenseCountingType' "Core"

pattern LicenseCountingType_Instance :: LicenseCountingType
pattern $bLicenseCountingType_Instance :: LicenseCountingType
$mLicenseCountingType_Instance :: forall r. LicenseCountingType -> (Void# -> r) -> (Void# -> r) -> r
LicenseCountingType_Instance = LicenseCountingType' "Instance"

pattern LicenseCountingType_Socket :: LicenseCountingType
pattern $bLicenseCountingType_Socket :: LicenseCountingType
$mLicenseCountingType_Socket :: forall r. LicenseCountingType -> (Void# -> r) -> (Void# -> r) -> r
LicenseCountingType_Socket = LicenseCountingType' "Socket"

pattern LicenseCountingType_VCPU :: LicenseCountingType
pattern $bLicenseCountingType_VCPU :: LicenseCountingType
$mLicenseCountingType_VCPU :: forall r. LicenseCountingType -> (Void# -> r) -> (Void# -> r) -> r
LicenseCountingType_VCPU = LicenseCountingType' "vCPU"

{-# COMPLETE
  LicenseCountingType_Core,
  LicenseCountingType_Instance,
  LicenseCountingType_Socket,
  LicenseCountingType_VCPU,
  LicenseCountingType'
  #-}