{-# 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.Lightsail.Types.ContainerServiceMetricName
-- 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.Lightsail.Types.ContainerServiceMetricName
  ( ContainerServiceMetricName
      ( ..,
        ContainerServiceMetricName_CPUUtilization,
        ContainerServiceMetricName_MemoryUtilization
      ),
  )
where

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

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

pattern ContainerServiceMetricName_CPUUtilization :: ContainerServiceMetricName
pattern $bContainerServiceMetricName_CPUUtilization :: ContainerServiceMetricName
$mContainerServiceMetricName_CPUUtilization :: forall r.
ContainerServiceMetricName -> (Void# -> r) -> (Void# -> r) -> r
ContainerServiceMetricName_CPUUtilization = ContainerServiceMetricName' "CPUUtilization"

pattern ContainerServiceMetricName_MemoryUtilization :: ContainerServiceMetricName
pattern $bContainerServiceMetricName_MemoryUtilization :: ContainerServiceMetricName
$mContainerServiceMetricName_MemoryUtilization :: forall r.
ContainerServiceMetricName -> (Void# -> r) -> (Void# -> r) -> r
ContainerServiceMetricName_MemoryUtilization = ContainerServiceMetricName' "MemoryUtilization"

{-# COMPLETE
  ContainerServiceMetricName_CPUUtilization,
  ContainerServiceMetricName_MemoryUtilization,
  ContainerServiceMetricName'
  #-}