{-# 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.BucketMetricName
-- 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.BucketMetricName
  ( BucketMetricName
      ( ..,
        BucketMetricName_BucketSizeBytes,
        BucketMetricName_NumberOfObjects
      ),
  )
where

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

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

pattern BucketMetricName_BucketSizeBytes :: BucketMetricName
pattern $bBucketMetricName_BucketSizeBytes :: BucketMetricName
$mBucketMetricName_BucketSizeBytes :: forall r. BucketMetricName -> (Void# -> r) -> (Void# -> r) -> r
BucketMetricName_BucketSizeBytes = BucketMetricName' "BucketSizeBytes"

pattern BucketMetricName_NumberOfObjects :: BucketMetricName
pattern $bBucketMetricName_NumberOfObjects :: BucketMetricName
$mBucketMetricName_NumberOfObjects :: forall r. BucketMetricName -> (Void# -> r) -> (Void# -> r) -> r
BucketMetricName_NumberOfObjects = BucketMetricName' "NumberOfObjects"

{-# COMPLETE
  BucketMetricName_BucketSizeBytes,
  BucketMetricName_NumberOfObjects,
  BucketMetricName'
  #-}