{-# 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-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.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.Prelude as Prelude

newtype CustomMetricType = CustomMetricType'
  { CustomMetricType -> Text
fromCustomMetricType ::
      Core.Text
  }
  deriving stock
    ( Int -> CustomMetricType -> ShowS
[CustomMetricType] -> ShowS
CustomMetricType -> String
(Int -> CustomMetricType -> ShowS)
-> (CustomMetricType -> String)
-> ([CustomMetricType] -> ShowS)
-> Show CustomMetricType
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]
(Int -> ReadS CustomMetricType)
-> ReadS [CustomMetricType]
-> ReadPrec CustomMetricType
-> ReadPrec [CustomMetricType]
-> Read 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
(CustomMetricType -> CustomMetricType -> Bool)
-> (CustomMetricType -> CustomMetricType -> Bool)
-> Eq CustomMetricType
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
Eq CustomMetricType
-> (CustomMetricType -> CustomMetricType -> Ordering)
-> (CustomMetricType -> CustomMetricType -> Bool)
-> (CustomMetricType -> CustomMetricType -> Bool)
-> (CustomMetricType -> CustomMetricType -> Bool)
-> (CustomMetricType -> CustomMetricType -> Bool)
-> (CustomMetricType -> CustomMetricType -> CustomMetricType)
-> (CustomMetricType -> CustomMetricType -> CustomMetricType)
-> Ord 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
$cp1Ord :: Eq CustomMetricType
Prelude.Ord,
      (forall x. CustomMetricType -> Rep CustomMetricType x)
-> (forall x. Rep CustomMetricType x -> CustomMetricType)
-> Generic CustomMetricType
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
    ( Int -> CustomMetricType -> Int
CustomMetricType -> Int
(Int -> CustomMetricType -> Int)
-> (CustomMetricType -> Int) -> Hashable CustomMetricType
forall 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 -> ()
(CustomMetricType -> ()) -> NFData CustomMetricType
forall a. (a -> ()) -> NFData a
rnf :: CustomMetricType -> ()
$crnf :: CustomMetricType -> ()
Prelude.NFData,
      Text -> Either String CustomMetricType
(Text -> Either String CustomMetricType)
-> FromText CustomMetricType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CustomMetricType
$cfromText :: Text -> Either String CustomMetricType
Core.FromText,
      CustomMetricType -> Text
(CustomMetricType -> Text) -> ToText CustomMetricType
forall a. (a -> Text) -> ToText a
toText :: CustomMetricType -> Text
$ctoText :: CustomMetricType -> Text
Core.ToText,
      CustomMetricType -> ByteString
(CustomMetricType -> ByteString) -> ToByteString CustomMetricType
forall a. (a -> ByteString) -> ToByteString a
toBS :: CustomMetricType -> ByteString
$ctoBS :: CustomMetricType -> ByteString
Core.ToByteString,
      CustomMetricType -> ByteStringBuilder
(CustomMetricType -> ByteStringBuilder) -> ToLog CustomMetricType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CustomMetricType -> ByteStringBuilder
$cbuild :: CustomMetricType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CustomMetricType -> [Header]
(HeaderName -> CustomMetricType -> [Header])
-> ToHeader CustomMetricType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CustomMetricType -> [Header]
$ctoHeader :: HeaderName -> CustomMetricType -> [Header]
Core.ToHeader,
      CustomMetricType -> QueryString
(CustomMetricType -> QueryString) -> ToQuery CustomMetricType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CustomMetricType -> QueryString
$ctoQuery :: CustomMetricType -> QueryString
Core.ToQuery,
      Value -> Parser [CustomMetricType]
Value -> Parser CustomMetricType
(Value -> Parser CustomMetricType)
-> (Value -> Parser [CustomMetricType])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [CustomMetricType]
FromJSONKeyFunction CustomMetricType
FromJSONKeyFunction CustomMetricType
-> FromJSONKeyFunction [CustomMetricType]
-> FromJSONKey CustomMetricType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CustomMetricType]
$cfromJSONKeyList :: FromJSONKeyFunction [CustomMetricType]
fromJSONKey :: FromJSONKeyFunction CustomMetricType
$cfromJSONKey :: FromJSONKeyFunction CustomMetricType
Core.FromJSONKey,
      [CustomMetricType] -> Encoding
[CustomMetricType] -> Value
CustomMetricType -> Encoding
CustomMetricType -> Value
(CustomMetricType -> Value)
-> (CustomMetricType -> Encoding)
-> ([CustomMetricType] -> Value)
-> ([CustomMetricType] -> Encoding)
-> ToJSON CustomMetricType
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
Core.ToJSON,
      ToJSONKeyFunction [CustomMetricType]
ToJSONKeyFunction CustomMetricType
ToJSONKeyFunction CustomMetricType
-> ToJSONKeyFunction [CustomMetricType]
-> ToJSONKey CustomMetricType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CustomMetricType]
$ctoJSONKeyList :: ToJSONKeyFunction [CustomMetricType]
toJSONKey :: ToJSONKeyFunction CustomMetricType
$ctoJSONKey :: ToJSONKeyFunction CustomMetricType
Core.ToJSONKey,
      [Node] -> Either String CustomMetricType
([Node] -> Either String CustomMetricType)
-> FromXML CustomMetricType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CustomMetricType
$cparseXML :: [Node] -> Either String CustomMetricType
Core.FromXML,
      CustomMetricType -> XML
(CustomMetricType -> XML) -> ToXML CustomMetricType
forall a. (a -> XML) -> ToXML a
toXML :: CustomMetricType -> XML
$ctoXML :: CustomMetricType -> XML
Core.ToXML
    )

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

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

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

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

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