{-# 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.S3.Types.MetricsStatus
-- 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.S3.Types.MetricsStatus
  ( MetricsStatus
      ( ..,
        MetricsStatus_Disabled,
        MetricsStatus_Enabled
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal

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

pattern MetricsStatus_Disabled :: MetricsStatus
pattern $bMetricsStatus_Disabled :: MetricsStatus
$mMetricsStatus_Disabled :: forall r. MetricsStatus -> (Void# -> r) -> (Void# -> r) -> r
MetricsStatus_Disabled = MetricsStatus' "Disabled"

pattern MetricsStatus_Enabled :: MetricsStatus
pattern $bMetricsStatus_Enabled :: MetricsStatus
$mMetricsStatus_Enabled :: forall r. MetricsStatus -> (Void# -> r) -> (Void# -> r) -> r
MetricsStatus_Enabled = MetricsStatus' "Enabled"

{-# COMPLETE
  MetricsStatus_Disabled,
  MetricsStatus_Enabled,
  MetricsStatus'
  #-}