{-# 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.IoT.Types.CustomMetricType
-- 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.IoT.Types.CustomMetricType
  ( CustomMetricType
      ( ..,
        CustomMetricType_Ip_address_list,
        CustomMetricType_Number,
        CustomMetricType_Number_list,
        CustomMetricType_String_list
      ),
  )
where

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

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

pattern CustomMetricType_Ip_address_list :: CustomMetricType
pattern $bCustomMetricType_Ip_address_list :: CustomMetricType
$mCustomMetricType_Ip_address_list :: forall {r}. CustomMetricType -> ((# #) -> r) -> ((# #) -> r) -> r
CustomMetricType_Ip_address_list = CustomMetricType' "ip-address-list"

pattern CustomMetricType_Number :: CustomMetricType
pattern $bCustomMetricType_Number :: CustomMetricType
$mCustomMetricType_Number :: forall {r}. CustomMetricType -> ((# #) -> r) -> ((# #) -> r) -> r
CustomMetricType_Number = CustomMetricType' "number"

pattern CustomMetricType_Number_list :: CustomMetricType
pattern $bCustomMetricType_Number_list :: CustomMetricType
$mCustomMetricType_Number_list :: forall {r}. CustomMetricType -> ((# #) -> r) -> ((# #) -> r) -> r
CustomMetricType_Number_list = CustomMetricType' "number-list"

pattern CustomMetricType_String_list :: CustomMetricType
pattern $bCustomMetricType_String_list :: CustomMetricType
$mCustomMetricType_String_list :: forall {r}. CustomMetricType -> ((# #) -> r) -> ((# #) -> r) -> r
CustomMetricType_String_list = CustomMetricType' "string-list"

{-# COMPLETE
  CustomMetricType_Ip_address_list,
  CustomMetricType_Number,
  CustomMetricType_Number_list,
  CustomMetricType_String_list,
  CustomMetricType'
  #-}