{-# 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.ExpirationStatus
-- 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.ExpirationStatus
  ( ExpirationStatus
      ( ..,
        ExpirationStatus_Disabled,
        ExpirationStatus_Enabled
      ),
  )
where

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

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

pattern ExpirationStatus_Disabled :: ExpirationStatus
pattern $bExpirationStatus_Disabled :: ExpirationStatus
$mExpirationStatus_Disabled :: forall r. ExpirationStatus -> (Void# -> r) -> (Void# -> r) -> r
ExpirationStatus_Disabled = ExpirationStatus' "Disabled"

pattern ExpirationStatus_Enabled :: ExpirationStatus
pattern $bExpirationStatus_Enabled :: ExpirationStatus
$mExpirationStatus_Enabled :: forall r. ExpirationStatus -> (Void# -> r) -> (Void# -> r) -> r
ExpirationStatus_Enabled = ExpirationStatus' "Enabled"

{-# COMPLETE
  ExpirationStatus_Disabled,
  ExpirationStatus_Enabled,
  ExpirationStatus'
  #-}