{-# 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.Event
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.S3.Types.Event
  ( Event
      ( ..,
        Event_S3_IntelligentTiering,
        Event_S3_LifecycleExpiration_Delete,
        Event_S3_LifecycleExpiration_DeleteMarkerCreated,
        Event_S3_LifecycleExpiration__,
        Event_S3_LifecycleTransition,
        Event_S3_ObjectAcl_Put,
        Event_S3_ObjectCreated_CompleteMultipartUpload,
        Event_S3_ObjectCreated_Copy,
        Event_S3_ObjectCreated_Post,
        Event_S3_ObjectCreated_Put,
        Event_S3_ObjectCreated__,
        Event_S3_ObjectRemoved_Delete,
        Event_S3_ObjectRemoved_DeleteMarkerCreated,
        Event_S3_ObjectRemoved__,
        Event_S3_ObjectRestore_Completed,
        Event_S3_ObjectRestore_Delete,
        Event_S3_ObjectRestore_Post,
        Event_S3_ObjectRestore__,
        Event_S3_ObjectTagging_Delete,
        Event_S3_ObjectTagging_Put,
        Event_S3_ObjectTagging__,
        Event_S3_ReducedRedundancyLostObject,
        Event_S3_Replication_OperationFailedReplication,
        Event_S3_Replication_OperationMissedThreshold,
        Event_S3_Replication_OperationNotTracked,
        Event_S3_Replication_OperationReplicatedAfterThreshold,
        Event_S3_Replication__
      ),
  )
where

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

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

pattern Event_S3_IntelligentTiering :: Event
pattern $bEvent_S3_IntelligentTiering :: Event
$mEvent_S3_IntelligentTiering :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_IntelligentTiering = Event' "s3:IntelligentTiering"

pattern Event_S3_LifecycleExpiration_Delete :: Event
pattern $bEvent_S3_LifecycleExpiration_Delete :: Event
$mEvent_S3_LifecycleExpiration_Delete :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_LifecycleExpiration_Delete = Event' "s3:LifecycleExpiration:Delete"

pattern Event_S3_LifecycleExpiration_DeleteMarkerCreated :: Event
pattern $bEvent_S3_LifecycleExpiration_DeleteMarkerCreated :: Event
$mEvent_S3_LifecycleExpiration_DeleteMarkerCreated :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_LifecycleExpiration_DeleteMarkerCreated = Event' "s3:LifecycleExpiration:DeleteMarkerCreated"

pattern Event_S3_LifecycleExpiration__ :: Event
pattern $bEvent_S3_LifecycleExpiration__ :: Event
$mEvent_S3_LifecycleExpiration__ :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_LifecycleExpiration__ = Event' "s3:LifecycleExpiration:*"

pattern Event_S3_LifecycleTransition :: Event
pattern $bEvent_S3_LifecycleTransition :: Event
$mEvent_S3_LifecycleTransition :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_LifecycleTransition = Event' "s3:LifecycleTransition"

pattern Event_S3_ObjectAcl_Put :: Event
pattern $bEvent_S3_ObjectAcl_Put :: Event
$mEvent_S3_ObjectAcl_Put :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectAcl_Put = Event' "s3:ObjectAcl:Put"

pattern Event_S3_ObjectCreated_CompleteMultipartUpload :: Event
pattern $bEvent_S3_ObjectCreated_CompleteMultipartUpload :: Event
$mEvent_S3_ObjectCreated_CompleteMultipartUpload :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectCreated_CompleteMultipartUpload = Event' "s3:ObjectCreated:CompleteMultipartUpload"

pattern Event_S3_ObjectCreated_Copy :: Event
pattern $bEvent_S3_ObjectCreated_Copy :: Event
$mEvent_S3_ObjectCreated_Copy :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectCreated_Copy = Event' "s3:ObjectCreated:Copy"

pattern Event_S3_ObjectCreated_Post :: Event
pattern $bEvent_S3_ObjectCreated_Post :: Event
$mEvent_S3_ObjectCreated_Post :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectCreated_Post = Event' "s3:ObjectCreated:Post"

pattern Event_S3_ObjectCreated_Put :: Event
pattern $bEvent_S3_ObjectCreated_Put :: Event
$mEvent_S3_ObjectCreated_Put :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectCreated_Put = Event' "s3:ObjectCreated:Put"

pattern Event_S3_ObjectCreated__ :: Event
pattern $bEvent_S3_ObjectCreated__ :: Event
$mEvent_S3_ObjectCreated__ :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectCreated__ = Event' "s3:ObjectCreated:*"

pattern Event_S3_ObjectRemoved_Delete :: Event
pattern $bEvent_S3_ObjectRemoved_Delete :: Event
$mEvent_S3_ObjectRemoved_Delete :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRemoved_Delete = Event' "s3:ObjectRemoved:Delete"

pattern Event_S3_ObjectRemoved_DeleteMarkerCreated :: Event
pattern $bEvent_S3_ObjectRemoved_DeleteMarkerCreated :: Event
$mEvent_S3_ObjectRemoved_DeleteMarkerCreated :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRemoved_DeleteMarkerCreated = Event' "s3:ObjectRemoved:DeleteMarkerCreated"

pattern Event_S3_ObjectRemoved__ :: Event
pattern $bEvent_S3_ObjectRemoved__ :: Event
$mEvent_S3_ObjectRemoved__ :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRemoved__ = Event' "s3:ObjectRemoved:*"

pattern Event_S3_ObjectRestore_Completed :: Event
pattern $bEvent_S3_ObjectRestore_Completed :: Event
$mEvent_S3_ObjectRestore_Completed :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRestore_Completed = Event' "s3:ObjectRestore:Completed"

pattern Event_S3_ObjectRestore_Delete :: Event
pattern $bEvent_S3_ObjectRestore_Delete :: Event
$mEvent_S3_ObjectRestore_Delete :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRestore_Delete = Event' "s3:ObjectRestore:Delete"

pattern Event_S3_ObjectRestore_Post :: Event
pattern $bEvent_S3_ObjectRestore_Post :: Event
$mEvent_S3_ObjectRestore_Post :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRestore_Post = Event' "s3:ObjectRestore:Post"

pattern Event_S3_ObjectRestore__ :: Event
pattern $bEvent_S3_ObjectRestore__ :: Event
$mEvent_S3_ObjectRestore__ :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectRestore__ = Event' "s3:ObjectRestore:*"

pattern Event_S3_ObjectTagging_Delete :: Event
pattern $bEvent_S3_ObjectTagging_Delete :: Event
$mEvent_S3_ObjectTagging_Delete :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectTagging_Delete = Event' "s3:ObjectTagging:Delete"

pattern Event_S3_ObjectTagging_Put :: Event
pattern $bEvent_S3_ObjectTagging_Put :: Event
$mEvent_S3_ObjectTagging_Put :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectTagging_Put = Event' "s3:ObjectTagging:Put"

pattern Event_S3_ObjectTagging__ :: Event
pattern $bEvent_S3_ObjectTagging__ :: Event
$mEvent_S3_ObjectTagging__ :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ObjectTagging__ = Event' "s3:ObjectTagging:*"

pattern Event_S3_ReducedRedundancyLostObject :: Event
pattern $bEvent_S3_ReducedRedundancyLostObject :: Event
$mEvent_S3_ReducedRedundancyLostObject :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_ReducedRedundancyLostObject = Event' "s3:ReducedRedundancyLostObject"

pattern Event_S3_Replication_OperationFailedReplication :: Event
pattern $bEvent_S3_Replication_OperationFailedReplication :: Event
$mEvent_S3_Replication_OperationFailedReplication :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_Replication_OperationFailedReplication = Event' "s3:Replication:OperationFailedReplication"

pattern Event_S3_Replication_OperationMissedThreshold :: Event
pattern $bEvent_S3_Replication_OperationMissedThreshold :: Event
$mEvent_S3_Replication_OperationMissedThreshold :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_Replication_OperationMissedThreshold = Event' "s3:Replication:OperationMissedThreshold"

pattern Event_S3_Replication_OperationNotTracked :: Event
pattern $bEvent_S3_Replication_OperationNotTracked :: Event
$mEvent_S3_Replication_OperationNotTracked :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_Replication_OperationNotTracked = Event' "s3:Replication:OperationNotTracked"

pattern Event_S3_Replication_OperationReplicatedAfterThreshold :: Event
pattern $bEvent_S3_Replication_OperationReplicatedAfterThreshold :: Event
$mEvent_S3_Replication_OperationReplicatedAfterThreshold :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_Replication_OperationReplicatedAfterThreshold = Event' "s3:Replication:OperationReplicatedAfterThreshold"

pattern Event_S3_Replication__ :: Event
pattern $bEvent_S3_Replication__ :: Event
$mEvent_S3_Replication__ :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_S3_Replication__ = Event' "s3:Replication:*"

{-# COMPLETE
  Event_S3_IntelligentTiering,
  Event_S3_LifecycleExpiration_Delete,
  Event_S3_LifecycleExpiration_DeleteMarkerCreated,
  Event_S3_LifecycleExpiration__,
  Event_S3_LifecycleTransition,
  Event_S3_ObjectAcl_Put,
  Event_S3_ObjectCreated_CompleteMultipartUpload,
  Event_S3_ObjectCreated_Copy,
  Event_S3_ObjectCreated_Post,
  Event_S3_ObjectCreated_Put,
  Event_S3_ObjectCreated__,
  Event_S3_ObjectRemoved_Delete,
  Event_S3_ObjectRemoved_DeleteMarkerCreated,
  Event_S3_ObjectRemoved__,
  Event_S3_ObjectRestore_Completed,
  Event_S3_ObjectRestore_Delete,
  Event_S3_ObjectRestore_Post,
  Event_S3_ObjectRestore__,
  Event_S3_ObjectTagging_Delete,
  Event_S3_ObjectTagging_Put,
  Event_S3_ObjectTagging__,
  Event_S3_ReducedRedundancyLostObject,
  Event_S3_Replication_OperationFailedReplication,
  Event_S3_Replication_OperationMissedThreshold,
  Event_S3_Replication_OperationNotTracked,
  Event_S3_Replication_OperationReplicatedAfterThreshold,
  Event_S3_Replication__,
  Event'
  #-}